summaryrefslogtreecommitdiffstats
path: root/drivers
diff options
context:
space:
mode:
authorSakari Ailus <sakari.ailus@linux.intel.com>2017-11-01 10:40:58 +0100
committerMauro Carvalho Chehab <mchehab@s-opensource.com>2017-11-30 10:45:12 +0100
commit781b045baefdabf7e0bc9f33672ca830d3db9f27 (patch)
tree5d5ccf38a29c9cdca312d5bdf622902614a1c4d9 /drivers
parentmedia: v4l: async: use the v4l2_dev from the root notifier when matching sub-... (diff)
downloadlinux-781b045baefdabf7e0bc9f33672ca830d3db9f27.tar.xz
linux-781b045baefdabf7e0bc9f33672ca830d3db9f27.zip
media: imx274: Fix error handling, add MAINTAINERS entry
Add the missing MAINTAINERS entry for imx274, fix error handling in driver probe and unregister the correct control handler in driver remove. Signed-off-by: Sakari Ailus <sakari.ailus@linux.intel.com> Signed-off-by: Mauro Carvalho Chehab <mchehab@s-opensource.com>
Diffstat (limited to 'drivers')
-rw-r--r--drivers/media/i2c/imx274.c5
1 files changed, 2 insertions, 3 deletions
diff --git a/drivers/media/i2c/imx274.c b/drivers/media/i2c/imx274.c
index 800b9bf9cdd3..2f71af2f90bf 100644
--- a/drivers/media/i2c/imx274.c
+++ b/drivers/media/i2c/imx274.c
@@ -1770,8 +1770,7 @@ static int imx274_probe(struct i2c_client *client,
return 0;
err_ctrls:
- v4l2_async_unregister_subdev(sd);
- v4l2_ctrl_handler_free(sd->ctrl_handler);
+ v4l2_ctrl_handler_free(&imx274->ctrls.handler);
err_me:
media_entity_cleanup(&sd->entity);
err_regmap:
@@ -1788,7 +1787,7 @@ static int imx274_remove(struct i2c_client *client)
imx274_write_table(imx274, mode_table[IMX274_MODE_STOP_STREAM]);
v4l2_async_unregister_subdev(sd);
- v4l2_ctrl_handler_free(sd->ctrl_handler);
+ v4l2_ctrl_handler_free(&imx274->ctrls.handler);
media_entity_cleanup(&sd->entity);
mutex_destroy(&imx274->lock);
return 0;