diff mbox series

pinctrl: actions: signedness bug in owl_pinctrl_probe()

Message ID 20180703120255.rbkgt5lm53acnv6n@kili.mountain
State New
Headers show
Series pinctrl: actions: signedness bug in owl_pinctrl_probe() | expand

Commit Message

Dan Carpenter July 3, 2018, 12:02 p.m. UTC
pctrl->irq[i] is unsigned so it can't be less than zero.

Fixes: 6c5d0736e9c0 ("pinctrl: actions: Add interrupt support for OWL S900 SoC")
Signed-off-by: Dan Carpenter <dan.carpenter@oracle.com>

--
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

Comments

Dan Carpenter July 3, 2018, 12:27 p.m. UTC | #1
On Tue, Jul 03, 2018 at 03:02:55PM +0300, Dan Carpenter wrote:
> pctrl->irq[i] is unsigned so it can't be less than zero.
> 
> Fixes: 6c5d0736e9c0 ("pinctrl: actions: Add interrupt support for OWL S900 SoC")
> Signed-off-by: Dan Carpenter <dan.carpenter@oracle.com>

Never mind.  I see Colin already fixed this one.

regards,
dan carpenter

--
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 series

Patch

diff --git a/drivers/pinctrl/actions/pinctrl-owl.c b/drivers/pinctrl/actions/pinctrl-owl.c
index 4fa9cc377b3b..07f7be13d15b 100644
--- a/drivers/pinctrl/actions/pinctrl-owl.c
+++ b/drivers/pinctrl/actions/pinctrl-owl.c
@@ -1027,7 +1027,7 @@  int owl_pinctrl_probe(struct platform_device *pdev,
 
 	for (i = 0; i < pctrl->num_irq ; i++) {
 		pctrl->irq[i] = platform_get_irq(pdev, i);
-		if (pctrl->irq[i] < 0) {
+		if ((int)pctrl->irq[i] < 0) {
 			ret = pctrl->irq[i];
 			goto err_exit;
 		}