From: Guennadi Liakhovetski Date: Thu, 18 Apr 2013 21:35:23 +0000 (-0300) Subject: [media] imx074: fix error handling for failed async subdevice registration X-Git-Url: http://git.lede-project.org./?a=commitdiff_plain;h=507fcd3da2a28b5342cd0e3eea69b886741adb60;p=openwrt%2Fstaging%2Fblogic.git [media] imx074: fix error handling for failed async subdevice registration If v4l2_async_register_subdev() fails, don't skip the clean up. Signed-off-by: Guennadi Liakhovetski Signed-off-by: Mauro Carvalho Chehab --- diff --git a/drivers/media/i2c/soc_camera/imx074.c b/drivers/media/i2c/soc_camera/imx074.c index 1d384a371b41..5b915936c3f3 100644 --- a/drivers/media/i2c/soc_camera/imx074.c +++ b/drivers/media/i2c/soc_camera/imx074.c @@ -451,7 +451,9 @@ static int imx074_probe(struct i2c_client *client, if (ret < 0) goto eprobe; - return v4l2_async_register_subdev(&priv->subdev); + ret = v4l2_async_register_subdev(&priv->subdev); + if (!ret) + return 0; epwrinit: eprobe: