This is an automatic generated email to let you know that the following patch 
were queued:

Subject: media: i2c: adv7511-v4l2: drop check because i2c_unregister_device() 
is NULL safe
Author:  Wolfram Sang <[email protected]>
Date:    Tue Aug 20 12:34:40 2019 -0300

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

Signed-off-by: Wolfram Sang <[email protected]>
Signed-off-by: Hans Verkuil <[email protected]>
Signed-off-by: Mauro Carvalho Chehab <[email protected]>

 drivers/media/i2c/adv7511-v4l2.c | 6 ++----
 1 file changed, 2 insertions(+), 4 deletions(-)

---

diff --git a/drivers/media/i2c/adv7511-v4l2.c b/drivers/media/i2c/adv7511-v4l2.c
index 3b3966cdf594..62763ec4cd07 100644
--- a/drivers/media/i2c/adv7511-v4l2.c
+++ b/drivers/media/i2c/adv7511-v4l2.c
@@ -1940,8 +1940,7 @@ 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);
+       i2c_unregister_device(state->i2c_cec);
 err_unreg_edid:
        i2c_unregister_device(state->i2c_edid);
 err_entity:
@@ -1967,8 +1966,7 @@ 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_cec);
        i2c_unregister_device(state->i2c_pktmem);
        destroy_workqueue(state->work_queue);
        v4l2_device_unregister_subdev(sd);

_______________________________________________
linuxtv-commits mailing list
[email protected]
https://www.linuxtv.org/cgi-bin/mailman/listinfo/linuxtv-commits

Reply via email to