From patchwork Mon Mar 2 17:28:45 2015 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Baruch Siach X-Patchwork-Id: 445374 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by ozlabs.org (Postfix) with ESMTP id 0054314015A for ; Tue, 3 Mar 2015 04:29:55 +1100 (AEDT) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1754951AbbCBR3q (ORCPT ); Mon, 2 Mar 2015 12:29:46 -0500 Received: from guitar.tcltek.co.il ([192.115.133.116]:58257 "EHLO mx.tkos.co.il" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1756404AbbCBR3p (ORCPT ); Mon, 2 Mar 2015 12:29:45 -0500 Received: from tarshish.tkos.co.il (unknown [10.0.8.6]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-SHA256 (128/128 bits)) (No client certificate requested) by mx.tkos.co.il (Postfix) with ESMTPSA id 415F34403F9; Mon, 2 Mar 2015 19:29:43 +0200 (IST) From: Baruch Siach To: Jean-Christophe Plagniol-Villard Cc: Linus Walleij , linux-arm-kernel@lists.infradead.org, linux-gpio@vger.kernel.org, Baruch Siach Subject: [PATCH] pinctrl: at91: simplify probe error handling Date: Mon, 2 Mar 2015 19:28:45 +0200 Message-Id: <2adab2d9a86d0e44051541052ace08527bdcc045.1425317325.git.baruch@tkos.co.il> X-Mailer: git-send-email 2.1.4 Sender: linux-gpio-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-gpio@vger.kernel.org There is no code ender the 'err' label. Just return the error code directly. Signed-off-by: Baruch Siach Reviewed-by: Alexandre Belloni Acked-by: Ludovic Desroches --- drivers/pinctrl/pinctrl-at91.c | 6 +----- 1 file changed, 1 insertion(+), 5 deletions(-) diff --git a/drivers/pinctrl/pinctrl-at91.c b/drivers/pinctrl/pinctrl-at91.c index f4cd0b9b2438..6cfe534ab27e 100644 --- a/drivers/pinctrl/pinctrl-at91.c +++ b/drivers/pinctrl/pinctrl-at91.c @@ -1240,8 +1240,7 @@ static int at91_pinctrl_probe(struct platform_device *pdev) if (!info->pctl) { dev_err(&pdev->dev, "could not register AT91 pinctrl driver\n"); - ret = -EINVAL; - goto err; + return -EINVAL; } /* We will handle a range of GPIO pins */ @@ -1252,9 +1251,6 @@ static int at91_pinctrl_probe(struct platform_device *pdev) dev_info(&pdev->dev, "initialized AT91 pinctrl driver\n"); return 0; - -err: - return ret; } static int at91_pinctrl_remove(struct platform_device *pdev)