pinctrl: ti-iodelay: remove redundant pin < 0 check on unsigned int
authorColin Ian King <colin.king@canonical.com>
Fri, 13 Jan 2017 13:20:39 +0000 (13:20 +0000)
committerLinus Walleij <linus.walleij@linaro.org>
Wed, 18 Jan 2017 09:23:37 +0000 (10:23 +0100)
pin is an unsigned int and therefore can never be < 0 so
this check is redundant. Remove the check and the associated
dev_err error message.

Fixes CoverityScan CID#1396438 ("Unsigned compared against 0")

Signed-off-by: Colin Ian King <colin.king@canonical.com>
Acked-by: Nishanth Menon <nm@ti.com>
Signed-off-by: Linus Walleij <linus.walleij@linaro.org>
drivers/pinctrl/ti/pinctrl-ti-iodelay.c

index 7f472f123515c8b3b611fbd50b12dad29b0e0694..717e3404900ca414325086268e55d7ee9f5eb42f 100644 (file)
@@ -665,12 +665,6 @@ static void ti_iodelay_pin_dbg_show(struct pinctrl_dev *pctldev,
        r = iod->reg_data;
 
        offset = ti_iodelay_pin_to_offset(iod, pin);
-       if (pin < 0) {
-               dev_err(iod->dev, "invalid pin offset for pin%i\n", pin);
-
-               return;
-       }
-
        pd = &iod->pa[pin];
        cfg = pd->drv_data;