]> git.ipfire.org Git - thirdparty/kernel/stable.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)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Sun, 24 Nov 2019 07:23:22 +0000 (08:23 +0100)
[ Upstream commit f9a0b14240a2d0bd196d35e8aac73df6eabd6382 ]

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>
Signed-off-by: Sasha Levin <sashal@kernel.org>
drivers/media/i2c/dw9714.c

index 95af4fc99cd043016c7c4e810019473a99acc5f9..c1273bcd5901128fb5ae516f37bf70e4bfc50a98 100644 (file)
@@ -182,7 +182,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;
 }