summaryrefslogtreecommitdiff
path: root/drivers/media/i2c/dw9807-vcm.c
diff options
context:
space:
mode:
authorSakari Ailus <sakari.ailus@linux.intel.com>2018-10-05 17:20:09 -0400
committerMauro Carvalho Chehab <mchehab+samsung@kernel.org>2018-10-08 11:51:31 -0400
commit9e5b5081fa117ae34eca94b63b1cb6d43dc28f10 (patch)
treea8607b3874cce518a2227914ef3b0b434ff33726 /drivers/media/i2c/dw9807-vcm.c
parent1c55ecab313321405b3cf8594df79f829f32dfaf (diff)
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/i2c/dw9807-vcm.c')
-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;
}