diff options
author | Yang Li <yang.lee@linux.alibaba.com> | 2021-01-29 09:10:12 +0100 |
---|---|---|
committer | Sebastian Reichel <sre@kernel.org> | 2021-04-05 11:37:06 +0200 |
commit | 816aacd541df8e93f0d2f438b584b6a9560a25c7 (patch) | |
tree | e89d1801cefb69bea229791a98136ac4aa346655 /drivers/power | |
parent | power: supply: cpcap-charger: Add usleep to cpcap charger to avoid usb plug b... (diff) | |
download | linux-816aacd541df8e93f0d2f438b584b6a9560a25c7.tar.xz linux-816aacd541df8e93f0d2f438b584b6a9560a25c7.zip |
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')
-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); |