Message ID | 1456209934-13439-1-git-send-email-a.hajda@samsung.com |
---|---|
State | New |
Headers | show |
On Tue, Feb 23, 2016 at 7:45 AM, Andrzej Hajda <a.hajda@samsung.com> wrote: > ret variable can contain error values and is compared with zero. > Its type must be signed. > > The problem has been detected using coccinelle script > scripts/coccinelle/tests/unsigned_lesser_than_zero.cocci > > Signed-off-by: Andrzej Hajda <a.hajda@samsung.com> Patch applied as obviously correct. Yours, Linus Walleij -- 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 --git a/drivers/gpio/gpio-xgene-sb.c b/drivers/gpio/gpio-xgene-sb.c index b993b86..fd81ebc 100644 --- a/drivers/gpio/gpio-xgene-sb.c +++ b/drivers/gpio/gpio-xgene-sb.c @@ -240,7 +240,7 @@ static const struct irq_domain_ops xgene_gpio_sb_domain_ops = { static int xgene_gpio_sb_probe(struct platform_device *pdev) { struct xgene_gpio_sb *priv; - u32 ret; + int ret; struct resource *res; void __iomem *regs; struct irq_domain *parent_domain = NULL;
ret variable can contain error values and is compared with zero. Its type must be signed. The problem has been detected using coccinelle script scripts/coccinelle/tests/unsigned_lesser_than_zero.cocci Signed-off-by: Andrzej Hajda <a.hajda@samsung.com> --- drivers/gpio/gpio-xgene-sb.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)