From: Colin Ian King Date: Fri, 13 Jan 2017 13:20:39 +0000 (+0000) Subject: pinctrl: ti-iodelay: remove redundant pin < 0 check on unsigned int X-Git-Tag: v5.15~11858^2~49 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=731d43cd6bacd39c39b5c957fa2bb0031bda0dce;p=platform%2Fkernel%2Flinux-starfive.git pinctrl: ti-iodelay: remove redundant pin < 0 check on unsigned int 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 Acked-by: Nishanth Menon Signed-off-by: Linus Walleij --- diff --git a/drivers/pinctrl/ti/pinctrl-ti-iodelay.c b/drivers/pinctrl/ti/pinctrl-ti-iodelay.c index 7f472f1..717e340 100644 --- a/drivers/pinctrl/ti/pinctrl-ti-iodelay.c +++ b/drivers/pinctrl/ti/pinctrl-ti-iodelay.c @@ -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;