]> git.proxmox.com Git - mirror_ubuntu-hirsute-kernel.git/commitdiff
staging:iio:tsl2563 Simplify exit path on error in read_interrupt_config.
authorJonathan Cameron <jic23@kernel.org>
Sat, 12 Jan 2013 10:35:00 +0000 (10:35 +0000)
committerJonathan Cameron <jic23@kernel.org>
Sat, 26 Jan 2013 10:36:51 +0000 (10:36 +0000)
A rather over complicated exit path given there is only one exit
route and nothing much is done after it.

Signed-off-by: Jonathan Cameron <jic23@kernel.org>
Acked-by: Peter Meerwald <pmeerw@pmeerw.net>
drivers/staging/iio/light/tsl2563.c

index 547203cfd5d595532f1e8839d27f0be9e9b36943..1a3092a515ff952ee4eeb58a785bec235cc8ce0a 100644 (file)
@@ -672,11 +672,9 @@ static int tsl2563_read_interrupt_config(struct iio_dev *indio_dev,
                                       TSL2563_CMD | TSL2563_REG_INT);
        mutex_unlock(&chip->lock);
        if (ret < 0)
-               goto error_ret;
-       ret = !!(ret & 0x30);
-error_ret:
+               return ret;
 
-       return ret;
+       return !!(ret & 0x30);
 }
 
 static struct i2c_driver tsl2563_i2c_driver;