]> git.proxmox.com Git - mirror_ubuntu-kernels.git/commitdiff
[media] smiapp: Fix error handling in power on sequence
authorSakari Ailus <sakari.ailus@linux.intel.com>
Tue, 29 Aug 2017 12:41:22 +0000 (09:41 -0300)
committerMauro Carvalho Chehab <mchehab@osg.samsung.com>
Wed, 4 Oct 2017 20:23:37 +0000 (17:23 -0300)
The error handling code in smiapp_power_on() returned in case of a failed
I2C write instead of cleaning up the mess. Fix this.

Signed-off-by: Sakari Ailus <sakari.ailus@linux.intel.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@osg.samsung.com>
drivers/media/i2c/smiapp/smiapp-core.c

index 700f433261d01b7700756cde33c2ca8b05af3e59..d581625d782631db939a09adb4abe542f4a83871 100644 (file)
@@ -1313,7 +1313,7 @@ static int smiapp_power_on(struct device *dev)
        rval = smiapp_write(sensor, SMIAPP_REG_U8_DPHY_CTRL,
                            SMIAPP_DPHY_CTRL_UI);
        if (rval < 0)
-               return rval;
+               goto out_cci_addr_fail;
 
        rval = smiapp_call_quirk(sensor, post_poweron);
        if (rval) {