[media] imx074: fix error handling for failed async subdevice registration
authorGuennadi Liakhovetski <g.liakhovetski@gmx.de>
Thu, 18 Apr 2013 21:35:23 +0000 (18:35 -0300)
committerMauro Carvalho Chehab <m.chehab@samsung.com>
Thu, 31 Oct 2013 06:28:58 +0000 (04:28 -0200)
If v4l2_async_register_subdev() fails, don't skip the clean up.

Signed-off-by: Guennadi Liakhovetski <g.liakhovetski@gmx.de>
Signed-off-by: Mauro Carvalho Chehab <m.chehab@samsung.com>
drivers/media/i2c/soc_camera/imx074.c

index 1d384a3..5b91593 100644 (file)
@@ -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: