Received: by 2002:a05:6a10:6006:0:0:0:0 with SMTP id w6csp693516pxa; Thu, 27 Aug 2020 13:09:43 -0700 (PDT) X-Google-Smtp-Source: ABdhPJyQ0MhegK/CeUvYxEUt4I6IqJG2zC4lYDNbHt9ILbfywnoGyT/0Jvoa75kNyh5aH/aiPy5V X-Received: by 2002:a50:f309:: with SMTP id p9mr9027660edm.341.1598558983574; Thu, 27 Aug 2020 13:09:43 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1598558983; cv=none; d=google.com; s=arc-20160816; b=GMqwD1OuCdir1rhUecZwnGzgAgP/y/14yEbXfhxBoeKXBhgMVo36EeIpZOmHIxtpCc eRZKqj8JCrJnjKPf4gAGmblNU5dxLLvw/V/PXsZe21czMS56ln78PZhKXHpYPffvKrG4 gjqv0OBcBgh6PxFbLXYXiipRzy8bdlkqpg/nTFiVzsh4hofyfmOhLvpcquC+5T9upwnz WS/K/Yh0ZrL0TlwRnpDNK3FHYi+P4ZzlrhaAYa0yzdQEGynCsmb+n2iXoWvypaRgTG2N BlGkkwJrvdaEeh6VZstdprHqYSrtdOhbD5LtgeO3ZK+pFAreIKO/u/nF3pAuwtLPt8bl TSUA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:message-id:date:subject:cc:to:from :dkim-signature; bh=V014xa9wTUyTGz/DTPPl7Ew3oPq6QC4y88/BmTgfm/A=; b=H0Cl/wUPjy0rZ7NACuhyId+WlON7hKBOW7p38KEmVpeQ3/zS+aDt8Gjbtgg9gD29p2 JJHgpkATX0WFlFdhf14n9Io2BGHoNutD09t3SMJ40url7k6oPUJR1ksLSzR/MYvXwLaC BA2EgG25PXkcMwHiXFuyrbGpzVsYUoKnV2qWZNCXTDDUhDkajA4HA1o3C2/7aRwXKhih Vn0HUtXv9qXN6UfO1+r4aWyjYzX1hO4hIKg4kq5ktcjb3wLevyb7ScGbk9eKhfosJ802 gG9UmnVmlB1fNjcxn3tsR4Bp+C5kPNcigqnipg7eULZuj4vjy6Pz26p9Uc2+usuJVFpu gPnA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=default header.b=JFu15cCT; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id k2si2041863edf.372.2020.08.27.13.09.20; Thu, 27 Aug 2020 13:09:43 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; dkim=pass header.i=@kernel.org header.s=default header.b=JFu15cCT; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1727015AbgH0UIi (ORCPT + 99 others); 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-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@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 --- 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; -- 2.17.1