Re: [PATCH 5/7] iio: light: tsl2583: check return values from taos_chip_{on, off}

2016-10-19 Thread Dan Carpenter
On Wed, Oct 19, 2016 at 08:48:32AM -0400, Brian Masney wrote: > Ok, I'll rework my patch series to stick with the direct returns. I > personally prefer that approach. I was using the gotos since I thought > that was standard convention in the kernel. > It *should* but "goto unlock;" When you

Re: [PATCH 5/7] iio: light: tsl2583: check return values from taos_chip_{on, off}

2016-10-19 Thread Brian Masney
On Wed, Oct 19, 2016 at 02:22:49PM +0300, Dan Carpenter wrote: > On Wed, Oct 19, 2016 at 06:32:08AM -0400, Brian Masney wrote: > > @@ -775,14 +778,20 @@ static ssize_t illuminance0_lux_table_store(struct > > device *dev, > > goto luxable_store_done; > > } > > > > - if

Re: [PATCH 5/7] iio: light: tsl2583: check return values from taos_chip_{on, off}

2016-10-19 Thread Dan Carpenter
On Wed, Oct 19, 2016 at 06:32:08AM -0400, Brian Masney wrote: > @@ -775,14 +778,20 @@ static ssize_t illuminance0_lux_table_store(struct > device *dev, > goto luxable_store_done; > } > > - if (chip->taos_chip_status == TSL258X_CHIP_WORKING) > -

[PATCH 5/7] iio: light: tsl2583: check return values from taos_chip_{on, off}

2016-10-19 Thread Brian Masney
The return values from taos_chip_on() and taos_chip_off() was not checked in several places. This patch adds proper error checking to these function calls. Signed-off-by: Brian Masney --- drivers/staging/iio/light/tsl2583.c | 25 ++--- 1 file changed,