Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

pinctrl: msm: drop negativity check on unsigned value

[linux-3.16-rc5/drivers/pinctrl/pinctrl-msm.c:145]: (style) Checking if
unsigned variable 'mux_bit' is less than zero.

if (WARN_ON(g->mux_bit < 0))
return -EINVAL;

Bugzilla: https://bugzilla.kernel.org/show_bug.cgi?id=80491
Reported-by: David Binderman <dcb314@hotmail.com>
Signed-off-by: Andrey Utkin <andrey.krieger.utkin@gmail.com>
Signed-off-by: Linus Walleij <linus.walleij@linaro.org>

authored by

Andrey Utkin and committed by
Linus Walleij
1c349551 b4e7c55d

-3
-3
drivers/pinctrl/qcom/pinctrl-msm.c
··· 142 142 143 143 g = &pctrl->soc->groups[group]; 144 144 145 - if (WARN_ON(g->mux_bit < 0)) 146 - return -EINVAL; 147 - 148 145 for (i = 0; i < g->nfuncs; i++) { 149 146 if (g->funcs[i] == function) 150 147 break;