mirror of
https://github.com/raspberrypi/linux.git
synced 2025-12-15 22:41:38 +00:00
media: i2c: 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: Wolfram Sang <wsa+renesas@sang-engineering.com> Reviewed-by: Geert Uytterhoeven <geert+renesas@glider.be> Reviewed-by: Laurent Pinchart <laurent.pinchart+renesas@ideasonboard.com> Signed-off-by: Hans Verkuil <hverkuil-cisco@xs4all.nl>
This commit is contained in:
committed by
Hans Verkuil
parent
36fe515c1a
commit
b622e46690
@@ -625,8 +625,7 @@ error_free_ctrls:
|
||||
v4l2_ctrl_handler_free(&dev->ctrls);
|
||||
error:
|
||||
media_entity_cleanup(&dev->sd.entity);
|
||||
if (dev->sensor)
|
||||
i2c_unregister_device(dev->sensor);
|
||||
i2c_unregister_device(dev->sensor);
|
||||
|
||||
dev_err(&client->dev, "probe failed\n");
|
||||
|
||||
|
||||
Reference in New Issue
Block a user