mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
* [PATCH][V2] pinctrl: ti-iodelay: remove redundant pin < 0 check on unsigned int
@ 2017-01-13 21:06 Colin King
  2017-01-14 16:48 ` Nishanth Menon
  2017-01-16 15:45 ` Rob Herring
  0 siblings, 2 replies; 4+ messages in thread
From: Colin King @ 2017-01-13 21:06 UTC (permalink / raw)
  To: Linus Walleij, Nishanth Menon, Lokesh Vutla, Rob Herring, linux-gpio
  Cc: linux-kernel

From: Colin Ian King <colin.king@canonical.com>

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>
---
 drivers/pinctrl/ti/pinctrl-ti-iodelay.c | 6 ------
 1 file changed, 6 deletions(-)

diff --git a/drivers/pinctrl/ti/pinctrl-ti-iodelay.c b/drivers/pinctrl/ti/pinctrl-ti-iodelay.c
index 3b86d3d..a345166 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;
 
-- 
2.10.2

^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2017-01-16 15:53 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2017-01-13 21:06 [PATCH][V2] pinctrl: ti-iodelay: remove redundant pin < 0 check on unsigned int Colin King
2017-01-14 16:48 ` Nishanth Menon
2017-01-16 15:45 ` Rob Herring
2017-01-16 15:52   ` Colin Ian King

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox

Powered by JetHome