]> asedeno.scripts.mit.edu Git - linux.git/commitdiff
media: dw9714: Fix error handling in probe function
authorRajmohan Mani <rajmohan.mani@intel.com>
Fri, 5 Oct 2018 16:22:17 +0000 (12:22 -0400)
committerMauro Carvalho Chehab <mchehab+samsung@kernel.org>
Mon, 8 Oct 2018 15:50:40 +0000 (11:50 -0400)
Fixed the case where v4l2_async_unregister_subdev()
is called unnecessarily in the error handling path
in probe function.

Signed-off-by: Rajmohan Mani <rajmohan.mani@intel.com>
Signed-off-by: Sakari Ailus <sakari.ailus@linux.intel.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab+samsung@kernel.org>
drivers/media/i2c/dw9714.c

index 91fae01d052bf5568cd646d6bf521062182a43ca..3dc2100470a1cdf5ecb5c2c1115c921d10be09b8 100644 (file)
@@ -169,7 +169,8 @@ static int dw9714_probe(struct i2c_client *client)
        return 0;
 
 err_cleanup:
-       dw9714_subdev_cleanup(dw9714_dev);
+       v4l2_ctrl_handler_free(&dw9714_dev->ctrls_vcm);
+       media_entity_cleanup(&dw9714_dev->sd.entity);
        dev_err(&client->dev, "Probe failed: %d\n", rval);
        return rval;
 }