Commit 54515257 authored by Kaixu Xia's avatar Kaixu Xia Committed by Linus Walleij
Browse files

pinctrl: ocelot: Remove unnecessary conversion to bool



Fix the following coccicheck warning:

./drivers/pinctrl/pinctrl-ocelot.c:732:28-33: WARNING: conversion to bool not needed here

Reported-by: default avatarTosk Robot <tencent_os_robot@tencent.com>
Signed-off-by: default avatarKaixu Xia <kaixuxia@tencent.com>
Link: https://lore.kernel.org/r/1604651795-1220-1-git-send-email-kaixuxia@tencent.com


Signed-off-by: default avatarLinus Walleij <linus.walleij@linaro.org>
parent d0511b54
Loading
Loading
Loading
Loading
+1 −1
Original line number Diff line number Diff line
@@ -729,7 +729,7 @@ static int ocelot_pinconf_get(struct pinctrl_dev *pctldev,
		if (err)
			return err;
		if (param == PIN_CONFIG_BIAS_DISABLE)
			val = (val == 0 ? true : false);
			val = (val == 0);
		else if (param == PIN_CONFIG_BIAS_PULL_DOWN)
			val = (val & BIAS_PD_BIT ? true : false);
		else    /* PIN_CONFIG_BIAS_PULL_UP */