diff mbox

gpio: pca953x: fix boolreturn.cocci warnings

Message ID 20160407041739.GA8137@lkp-nhm1
State New
Headers show

Commit Message

kernel test robot April 7, 2016, 4:17 a.m. UTC
drivers/gpio/gpio-pca953x.c:522:10-11: WARNING: return of 0/1 in function 'pca953x_irq_pending' with return type bool

 Return statements in functions returning bool should use
 true/false instead of 1/0.
Generated by: scripts/coccinelle/misc/boolreturn.cocci

CC: Yong Li <yong.b.li@intel.com>
Signed-off-by: Fengguang Wu <fengguang.wu@intel.com>
---

 gpio-pca953x.c |    4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

--
To unsubscribe from this list: send the line "unsubscribe linux-gpio" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
diff mbox

Patch

--- a/drivers/gpio/gpio-pca953x.c
+++ b/drivers/gpio/gpio-pca953x.c
@@ -519,12 +519,12 @@  static bool pca953x_irq_pending(struct p
 		/* Read the current interrupt status from the device */
 		ret = pca953x_read_regs(chip, PCAL953X_INT_STAT, trigger);
 		if (ret)
-			return 0;
+			return false;
 
 		/* Check latched inputs and clear interrupt status */
 		ret = pca953x_read_regs(chip, PCA953X_INPUT, cur_stat);
 		if (ret)
-			return 0;
+			return false;
 
 		for (i = 0; i < NBANK(chip); i++) {
 			/* Apply filter for rising/falling edge selection */