]> git.baikalelectronics.ru Git - kernel.git/commit
power_supply: bq25890: make chip_id int
authorLaurentiu Palcu <laurentiu.palcu@intel.com>
Tue, 2 Jun 2015 10:36:51 +0000 (13:36 +0300)
committerSebastian Reichel <sre@kernel.org>
Tue, 2 Jun 2015 18:58:19 +0000 (20:58 +0200)
commitab942f9a8bf128543992c1b7ff92a69df53f945f
treeb11121f6ada4a7b034f9071bedef9a7f2fc419a8
parentf8e2f4b1f43644c489a547f1e1f36b650f2974f8
power_supply: bq25890: make chip_id int

Smatch static checker correctly detected an impossible condition because
chip_id was declared as u8, instead of int:

drivers/power/bq25890_charger.c:843 bq25890_probe()
warn: impossible condition '(bq->chip_id < 0) => (0-255 < 0)'

Also, while at it, fix the return value too.

Signed-off-by: Laurentiu Palcu <laurentiu.palcu@intel.com>
Reported-by: Dan Carpenter <dan.carpenter@oracle.com>
Reviewed-by: Krzysztof Kozlowski <k.kozlowski@samsung.com>
Signed-off-by: Sebastian Reichel <sre@kernel.org>
drivers/power/bq25890_charger.c