Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1757970AbaFZQRq (ORCPT ); Thu, 26 Jun 2014 12:17:46 -0400 Received: from mail-wg0-f50.google.com ([74.125.82.50]:52819 "EHLO mail-wg0-f50.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1757103AbaFZQRp (ORCPT ); Thu, 26 Jun 2014 12:17:45 -0400 From: Rickard Strandqvist To: Linus Walleij , Alexandre Courbot Cc: Rickard Strandqvist , linux-gpio@vger.kernel.org, linux-kernel@vger.kernel.org Subject: [PATCH] gpio: gpio-ucb1400.c: Cleaning up null pointer checks that could never happen Date: Thu, 26 Jun 2014 18:18:51 +0200 Message-Id: <1403799531-20526-1-git-send-email-rickard_strandqvist@spectrumdigital.se> X-Mailer: git-send-email 1.7.10.4 Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org 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 --- drivers/gpio/gpio-ucb1400.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/gpio/gpio-ucb1400.c b/drivers/gpio/gpio-ucb1400.c index 2445fe7..d520dc9 100644 --- a/drivers/gpio/gpio-ucb1400.c +++ b/drivers/gpio/gpio-ucb1400.c @@ -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: -- 1.7.10.4 -- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/