]> git.kernelconcepts.de Git - karo-tx-linux.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)
commit23fa43a28d00bca79b28e145a34c0c7dcafd72bc
treeb11121f6ada4a7b034f9071bedef9a7f2fc419a8
parente86d69dd786e94046b8f5be7df1b9a8226a40b2a
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