summaryrefslogtreecommitdiff
path: root/drivers/media
diff options
context:
space:
mode:
authorSakari Ailus <sakari.ailus@linux.intel.com>2018-10-06 00:20:09 +0300
committerMauro Carvalho Chehab <mchehab+samsung@kernel.org>2018-10-08 18:51:31 +0300
commit9e5b5081fa117ae34eca94b63b1cb6d43dc28f10 (patch)
treea8607b3874cce518a2227914ef3b0b434ff33726 /drivers/media
parent1c55ecab313321405b3cf8594df79f829f32dfaf (diff)
downloadlinux-9e5b5081fa117ae34eca94b63b1cb6d43dc28f10.tar.xz
media: dw9807-vcm: Fix probe error handling
v4l2_async_unregister_subdev() may not be called without v4l2_async_register_subdev() being called first. Fix this. Signed-off-by: Sakari Ailus <sakari.ailus@linux.intel.com> Signed-off-by: Mauro Carvalho Chehab <mchehab+samsung@kernel.org>
Diffstat (limited to 'drivers/media')
-rw-r--r--drivers/media/i2c/dw9807-vcm.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/drivers/media/i2c/dw9807-vcm.c b/drivers/media/i2c/dw9807-vcm.c
index a532c57dc636..b38a4e6d270d 100644
--- a/drivers/media/i2c/dw9807-vcm.c
+++ b/drivers/media/i2c/dw9807-vcm.c
@@ -218,7 +218,8 @@ static int dw9807_probe(struct i2c_client *client)
return 0;
err_cleanup:
- dw9807_subdev_cleanup(dw9807_dev);
+ v4l2_ctrl_handler_free(&dw9807_dev->ctrls_vcm);
+ media_entity_cleanup(&dw9807_dev->sd.entity);
return rval;
}