[PATCH] pinctrl: pinctrl-msm.c: Cleaning up if unsigned is less than zero

From: Rickard Strandqvist
Date: Thu Jun 26 2014 - 07:30:14 EST


Remove checking if a unsigned is less than zero

This was found using a static code analysis program called cppcheck.

Signed-off-by: Rickard Strandqvist <rickard_strandqvist@xxxxxxxxxxxxxxxxxx>
---
drivers/pinctrl/pinctrl-msm.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/pinctrl/pinctrl-msm.c b/drivers/pinctrl/pinctrl-msm.c
index df6dda4c..cde8b2b 100644
--- a/drivers/pinctrl/pinctrl-msm.c
+++ b/drivers/pinctrl/pinctrl-msm.c
@@ -176,7 +176,7 @@ static void msm_pinmux_disable(struct pinctrl_dev *pctldev,

g = &pctrl->soc->groups[group];

- if (WARN_ON(g->mux_bit < 0))
+ if (WARN_ON(g->mux_bit != 0))
return;

spin_lock_irqsave(&pctrl->lock, flags);
--
1.7.10.4

--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/