gpio: gpio-ucb1400.c: Cleaning up null pointer checks that could never happen
authorRickard Strandqvist <rickard_strandqvist@spectrumdigital.se>
Thu, 26 Jun 2014 16:18:51 +0000 (18:18 +0200)
committerLinus Walleij <linus.walleij@linaro.org>
Wed, 9 Jul 2014 10:22:55 +0000 (12:22 +0200)
Removal of null pointer checks that could never happen

This was found using a static code analysis program called cppcheck

Signed-off-by: Rickard Strandqvist <rickard_strandqvist@spectrumdigital.se>
Signed-off-by: Linus Walleij <linus.walleij@linaro.org>
drivers/gpio/gpio-ucb1400.c

index 2445fe7..d520dc9 100644 (file)
@@ -70,7 +70,7 @@ static int ucb1400_gpio_probe(struct platform_device *dev)
        if (err)
                goto err;
 
-       if (ucb && ucb->gpio_setup)
+       if (ucb->gpio_setup)
                err = ucb->gpio_setup(&dev->dev, ucb->gc.ngpio);
 
 err: