Re: [PATCH 1/1] iio: light: fix improper return value

2016-12-04 Thread Jonathan Cameron
On 03/12/16 09:24, Pan Bian wrote: > In function cm3232_reg_init(), it returns 0 even if the last call to > i2c_smbus_write_byte_data() returns a negative value (indicates error). > As a result, the return value may be inconsistent with the execution > status, and the caller of cm3232_reg_init() wi

[PATCH 1/1] iio: light: fix improper return value

2016-12-03 Thread Pan Bian
In function cm3232_reg_init(), it returns 0 even if the last call to i2c_smbus_write_byte_data() returns a negative value (indicates error). As a result, the return value may be inconsistent with the execution status, and the caller of cm3232_reg_init() will not be able to detect the error. This pa