Commit 086c51e2 authored by Wolfram Sang's avatar Wolfram Sang Committed by Mauro Carvalho Chehab
Browse files

media: i2c: adv7511-v4l2: drop check because i2c_unregister_device() is NULL safe



No need to check the argument of i2c_unregister_device() because the
function itself does it.

Signed-off-by: default avatarWolfram Sang <wsa+renesas@sang-engineering.com>
Signed-off-by: default avatarHans Verkuil <hverkuil-cisco@xs4all.nl>
Signed-off-by: default avatarMauro Carvalho Chehab <mchehab+samsung@kernel.org>
parent eb0a6fb2
Loading
Loading
Loading
Loading
+2 −4
Original line number Diff line number Diff line
@@ -1940,7 +1940,6 @@ static int adv7511_probe(struct i2c_client *client, const struct i2c_device_id *
err_unreg_pktmem:
	i2c_unregister_device(state->i2c_pktmem);
err_unreg_cec:
	if (state->i2c_cec)
	i2c_unregister_device(state->i2c_cec);
err_unreg_edid:
	i2c_unregister_device(state->i2c_edid);
@@ -1967,7 +1966,6 @@ static int adv7511_remove(struct i2c_client *client)
	adv7511_init_setup(sd);
	cancel_delayed_work(&state->edid_handler);
	i2c_unregister_device(state->i2c_edid);
	if (state->i2c_cec)
	i2c_unregister_device(state->i2c_cec);
	i2c_unregister_device(state->i2c_pktmem);
	destroy_workqueue(state->work_queue);