]> asedeno.scripts.mit.edu Git - linux.git/commitdiff
media: dw9807-vcm: Fix probe error handling
authorSakari Ailus <sakari.ailus@linux.intel.com>
Fri, 5 Oct 2018 21:20:09 +0000 (17:20 -0400)
committerMauro Carvalho Chehab <mchehab+samsung@kernel.org>
Mon, 8 Oct 2018 15:51:31 +0000 (11:51 -0400)
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>
drivers/media/i2c/dw9807-vcm.c

index a532c57dc636c32df7c0f358aaa81bcc396600c5..b38a4e6d270da7ba6f23d22aec2b5b2d2bf622a7 100644 (file)
@@ -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;
 }