diff mbox series

power: supply: cpcap-charger: remove unnecessary conversion to bool

Message ID 1614246375-89403-1-git-send-email-jiapeng.chong@linux.alibaba.com (mailing list archive)
State Not Applicable, archived
Headers show
Series power: supply: cpcap-charger: remove unnecessary conversion to bool | expand

Commit Message

Jiapeng Chong Feb. 25, 2021, 9:46 a.m. UTC
Fix the following coccicheck warnings:

./drivers/power/supply/cpcap-charger.c:468:31-36: WARNING: conversion to
bool not needed here.

Reported-by: Abaci Robot <abaci@linux.alibaba.com>
Signed-off-by: Jiapeng Chong <jiapeng.chong@linux.alibaba.com>
---
 drivers/power/supply/cpcap-charger.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
diff mbox series

Patch

diff --git a/drivers/power/supply/cpcap-charger.c b/drivers/power/supply/cpcap-charger.c
index 641dcad..0437480 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);