summaryrefslogtreecommitdiffstats
path: root/drivers/pinctrl
diff options
context:
space:
mode:
authorRickard Strandqvist <rickard_strandqvist@spectrumdigital.se>2014-06-26 13:32:49 +0200
committerLinus Walleij <linus.walleij@linaro.org>2014-07-11 14:08:33 +0200
commit8b0c107ce049ddaf0ca9d8cd4faac1cf5c1e9f20 (patch)
treee0b8a9a1e059c98e11e99ced6642710f97865450 /drivers/pinctrl
parent5aa498b95496204d3d9918b5d9287f0a4910a2a1 (diff)
downloadop-kernel-dev-8b0c107ce049ddaf0ca9d8cd4faac1cf5c1e9f20.zip
op-kernel-dev-8b0c107ce049ddaf0ca9d8cd4faac1cf5c1e9f20.tar.gz
pinctrl: pinctrl-st.c: Cleaning up if unsigned is less than zero
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@spectrumdigital.se> Acked-by: Srinivas Kandagatla <srinivas.kandagatla@linaro.org> Acked-by: Maxime Coquelin <maxime.coquelin@st.com> Signed-off-by: Linus Walleij <linus.walleij@linaro.org>
Diffstat (limited to 'drivers/pinctrl')
-rw-r--r--drivers/pinctrl/pinctrl-st.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/pinctrl/pinctrl-st.c b/drivers/pinctrl/pinctrl-st.c
index 5065611..1845870 100644
--- a/drivers/pinctrl/pinctrl-st.c
+++ b/drivers/pinctrl/pinctrl-st.c
@@ -1250,7 +1250,7 @@ static int st_pctl_parse_functions(struct device_node *np,
func = &info->functions[index];
func->name = np->name;
func->ngroups = of_get_child_count(np);
- if (func->ngroups <= 0) {
+ if (func->ngroups == 0) {
dev_err(info->dev, "No groups defined\n");
return -EINVAL;
}
OpenPOWER on IntegriCloud