mirror of
https://github.com/torvalds/linux.git
synced 2024-11-25 05:32:00 +00:00
power: supply: cpcap-charger: Simplify bool conversion
Fix the following coccicheck warning: ./drivers/power/supply/cpcap-charger.c:416:31-36: WARNING: conversion to bool not needed here Reported-by: Abaci Robot <abaci@linux.alibaba.com> Signed-off-by: Yang Li <yang.lee@linux.alibaba.com> Signed-off-by: Sebastian Reichel <sebastian.reichel@collabora.com>
This commit is contained in:
parent
751faedf06
commit
816aacd541
@ -465,7 +465,7 @@ static bool cpcap_charger_vbus_valid(struct cpcap_charger_ddata *ddata)
|
||||
|
||||
error = iio_read_channel_processed(channel, &value);
|
||||
if (error >= 0)
|
||||
return value > 3900 ? true : false;
|
||||
return value > 3900;
|
||||
|
||||
dev_err(ddata->dev, "error reading VBUS: %i\n", error);
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user