Re: [PATCH] regulator: ad5398: Fix return value of ad5398_write_reg

2016-02-12 Thread Michael Hennerich
On 02/11/2016 11:17 AM, Axel Lin wrote: i2c_master_send() returns the number of bytes written on success. So current code returns 2 if ad5398_write_reg() success. This return value is propagated to .set_current_limit, .enable and .disable callbacks of regulator_ops. This can be a problem, for

Re: [PATCH] regulator: ad5398: Fix return value of ad5398_write_reg

2016-02-12 Thread Michael Hennerich
On 02/11/2016 11:17 AM, Axel Lin wrote: i2c_master_send() returns the number of bytes written on success. So current code returns 2 if ad5398_write_reg() success. This return value is propagated to .set_current_limit, .enable and .disable callbacks of regulator_ops. This can be a problem, for

[PATCH] regulator: ad5398: Fix return value of ad5398_write_reg

2016-02-11 Thread Axel Lin
i2c_master_send() returns the number of bytes written on success. So current code returns 2 if ad5398_write_reg() success. This return value is propagated to .set_current_limit, .enable and .disable callbacks of regulator_ops. This can be a problem, for example, if the users test if the return

[PATCH] regulator: ad5398: Fix return value of ad5398_write_reg

2016-02-11 Thread Axel Lin
i2c_master_send() returns the number of bytes written on success. So current code returns 2 if ad5398_write_reg() success. This return value is propagated to .set_current_limit, .enable and .disable callbacks of regulator_ops. This can be a problem, for example, if the users test if the return