From: Rajmohan Mani Date: Fri, 5 Oct 2018 16:22:17 +0000 (-0400) Subject: media: dw9714: Fix error handling in probe function X-Git-Url: http://git.cdn.openwrt.org/?a=commitdiff_plain;h=f9a0b14240a2d0bd196d35e8aac73df6eabd6382;p=openwrt%2Fstaging%2Fblogic.git media: dw9714: Fix error handling in probe function Fixed the case where v4l2_async_unregister_subdev() is called unnecessarily in the error handling path in probe function. Signed-off-by: Rajmohan Mani Signed-off-by: Sakari Ailus Signed-off-by: Mauro Carvalho Chehab --- diff --git a/drivers/media/i2c/dw9714.c b/drivers/media/i2c/dw9714.c index 91fae01d052b..3dc2100470a1 100644 --- a/drivers/media/i2c/dw9714.c +++ b/drivers/media/i2c/dw9714.c @@ -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; }