diff options
author | Yang Li <yang.lee@linux.alibaba.com> | 2021-01-29 11:10:12 +0300 |
---|---|---|
committer | Sebastian Reichel <sre@kernel.org> | 2021-04-05 12:37:06 +0300 |
commit | 816aacd541df8e93f0d2f438b584b6a9560a25c7 (patch) | |
tree | e89d1801cefb69bea229791a98136ac4aa346655 /drivers/power/supply/cpcap-charger.c | |
parent | 751faedf06e895a17e985a88ef5b6364ffd797ed (diff) | |
download | linux-816aacd541df8e93f0d2f438b584b6a9560a25c7.tar.xz |
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>
Diffstat (limited to 'drivers/power/supply/cpcap-charger.c')
-rw-r--r-- | drivers/power/supply/cpcap-charger.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/power/supply/cpcap-charger.c b/drivers/power/supply/cpcap-charger.c index 2a8915c3e73e..df01abc49ce8 100644 --- a/drivers/power/supply/cpcap-charger.c +++ b/drivers/power/supply/cpcap-charger.c @@ -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); |