From patchwork Thu Aug 27 20:08:22 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Krzysztof Kozlowski X-Patchwork-Id: 11741813 Return-Path: Received: from mail.kernel.org (pdx-korg-mail-1.web.codeaurora.org [172.30.200.123]) by pdx-korg-patchwork-2.web.codeaurora.org (Postfix) with ESMTP id 214C413A4 for ; Thu, 27 Aug 2020 20:08:43 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id 04B2A2084C for ; Thu, 27 Aug 2020 20:08:43 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1598558923; bh=GsZSIjNUufzxlG+lWH52LkwmFcasCpG+/8INcx8Ulgk=; h=From:To:Cc:Subject:Date:List-ID:From; b=jGyK9wEom1P7oyLGSGwgrzOvnJWn9Ah3uiI3sKFJrmpXcMzRVYa2DY4TE1SnSjkRa AXEMPb3TQ9DhWr628opJSQUwvajyU3+rVCZ7/jGlQAk61Vh9tMVi+1tUVanM4PVqUQ udQT17PdUd8dWQg5k5G6WTCdxu/0w3suOA/zx8XE= Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726968AbgH0UIi (ORCPT ); Thu, 27 Aug 2020 16:08:38 -0400 Received: from mail.kernel.org ([198.145.29.99]:55066 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726289AbgH0UIg (ORCPT ); Thu, 27 Aug 2020 16:08:36 -0400 Received: from localhost.localdomain (unknown [194.230.155.216]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPSA id E478120737; Thu, 27 Aug 2020 20:08:31 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1598558915; bh=GsZSIjNUufzxlG+lWH52LkwmFcasCpG+/8INcx8Ulgk=; h=From:To:Cc:Subject:Date:From; b=JFu15cCTxHA3ICWzg7fOthQ1h1OSPYSyM1SxSI9hWdyq1x4YeaV5N+CubpYZktS94 8Q7t2nsnCTS0EhynQiiQsovUFqqYpzBK5ys8D4NFvKsyfzf0ixGuxlwGYNUoqQgj5E N2P+QdbAx3pIDCEyZKCvztUrIvzq4aZk3+tU6gAw= From: Krzysztof Kozlowski To: Ray Jui , Linus Walleij , Bartosz Golaszewski , Florian Fainelli , Scott Branden , bcm-kernel-feedback-list@broadcom.com, Keerthy , Grygorii Strashko , Santosh Shilimkar , Kevin Hilman , Michal Simek , linux-gpio@vger.kernel.org, linux-kernel@vger.kernel.org, linux-omap@vger.kernel.org, linux-arm-kernel@lists.infradead.org Cc: Krzysztof Kozlowski Subject: [PATCH 1/6] gpio: bcm-kona: Simplify with dev_err_probe() Date: Thu, 27 Aug 2020 22:08:22 +0200 Message-Id: <20200827200827.26462-1-krzk@kernel.org> X-Mailer: git-send-email 2.17.1 Sender: linux-omap-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-omap@vger.kernel.org Common pattern of handling deferred probe can be simplified with dev_err_probe(). Less code and also it prints the error value. Signed-off-by: Krzysztof Kozlowski Reviewed-by: Andy Shevchenko Acked-by: Florian Fainelli --- drivers/gpio/gpio-bcm-kona.c | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) diff --git a/drivers/gpio/gpio-bcm-kona.c b/drivers/gpio/gpio-bcm-kona.c index cf3687a7925f..1e6b427f2c4a 100644 --- a/drivers/gpio/gpio-bcm-kona.c +++ b/drivers/gpio/gpio-bcm-kona.c @@ -590,10 +590,7 @@ static int bcm_kona_gpio_probe(struct platform_device *pdev) dev_err(dev, "Couldn't determine # GPIO banks\n"); return -ENOENT; } else if (ret < 0) { - if (ret != -EPROBE_DEFER) - dev_err(dev, "Couldn't determine GPIO banks: (%pe)\n", - ERR_PTR(ret)); - return ret; + return dev_err_probe(dev, ret, "Couldn't determine GPIO banks\n"); } kona_gpio->num_bank = ret;