Re: [patch] ds2782_battery: signedness bug in ds278x_read_reg16()

2012-11-18 Thread Anton Vorontsov
On Wed, Oct 24, 2012 at 10:12:29AM +0300, Dan Carpenter wrote: > We need to check for negative values before doing the swab16() for the > error handling to work. > > Signed-off-by: Dan Carpenter Applied, thanks! > diff --git a/drivers/power/ds2782_battery.c b/drivers/power/ds2782_battery.c > in

[patch] ds2782_battery: signedness bug in ds278x_read_reg16()

2012-10-24 Thread Dan Carpenter
We need to check for negative values before doing the swab16() for the error handling to work. Signed-off-by: Dan Carpenter diff --git a/drivers/power/ds2782_battery.c b/drivers/power/ds2782_battery.c index 6bb6e2f..2fa9b6b 100644 --- a/drivers/power/ds2782_battery.c +++ b/drivers/power/ds2782_b