From patchwork Thu Feb 17 13:17:37 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: =?utf-8?b?TcOlbnMgUnVsbGfDpXJk?= X-Patchwork-Id: 12750031 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from bombadil.infradead.org (bombadil.infradead.org [198.137.202.133]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.lore.kernel.org (Postfix) with ESMTPS id 37E5BC433EF for ; Thu, 17 Feb 2022 13:20:13 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20210309; h=Sender: Content-Transfer-Encoding:Content-Type:List-Subscribe:List-Help:List-Post: List-Archive:List-Unsubscribe:List-Id:MIME-Version:Message-Id:Date:Subject:To :From:Reply-To:Cc:Content-ID:Content-Description:Resent-Date:Resent-From: Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID:In-Reply-To:References: List-Owner; bh=cjSomU4/1p8/17TXeRg5RvknozF1nZ9Yoo1hzhonpS0=; b=0AYhU2bd09+d6d igaCl/ob/D9qOIIGaCjFIwoOjav/CQ9vayrqYNCc+wjUK7x8rsl4Yy2NMJ5fwCZKOszqrvsE7r7s3 GTIP0Rj4qN1ljdI61iyPZRbQXjtu3PbFajMjfWAc0nnGnFztXpEPvGEl/IDSY5Dx9IGYbTNh8XpBg zXsA6esza7TyUp3sw4/WUwWAajCuLd/uvdZ9Ffiw/5fcp9c29SMS2rs4i+OM+BOVi/Z+biysDAtzs TTLldXnVKajxmlRCgwzD5UzEdqUu1jU8i5uttQS845MNACfn3NNJxiUoQNHPdkoldDfLEiT5X4UJY sKKwNdQW/Z5TvNhYOriw==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.94.2 #2 (Red Hat Linux)) id 1nKggc-00AaTJ-Cn; Thu, 17 Feb 2022 13:19:06 +0000 Received: from unicorn.mansr.com ([81.2.72.234]) by bombadil.infradead.org with esmtps (Exim 4.94.2 #2 (Red Hat Linux)) id 1nKggM-00AaMJ-Kb for linux-arm-kernel@lists.infradead.org; Thu, 17 Feb 2022 13:18:52 +0000 Received: from raven.mansr.com (raven.mansr.com [81.2.72.235]) by unicorn.mansr.com (Postfix) with ESMTPS id 84F8A15360; Thu, 17 Feb 2022 13:18:45 +0000 (GMT) Received: by raven.mansr.com (Postfix, from userid 51770) id 4EB30219C0A; Thu, 17 Feb 2022 13:18:45 +0000 (GMT) From: Mans Rullgard To: Linus Walleij , Maxime Ripard , Chen-Yu Tsai , Jernej Skrabec , linux-gpio@vger.kernel.org, linux-arm-kernel@lists.infradead.org, linux-kernel@vger.kernel.org Subject: [PATCH] pinctrl: sunxi: do not print error message for EPROBE_DEFER Date: Thu, 17 Feb 2022 13:17:37 +0000 Message-Id: <20220217131737.10931-1-mans@mansr.com> X-Mailer: git-send-email 2.35.1 MIME-Version: 1.0 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20220217_051850_882841_F11637F2 X-CRM114-Status: GOOD ( 10.78 ) X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.org Avoid printing an error message if getting a regulator fails with EPROBE_DEFER. This can happen if, for example, a regulator supplying one of the main banks is controlled by a PL pin. Signed-off-by: Mans Rullgard Acked-by: Chen-Yu Tsai --- drivers/pinctrl/sunxi/pinctrl-sunxi.c | 9 ++++----- 1 file changed, 4 insertions(+), 5 deletions(-) diff --git a/drivers/pinctrl/sunxi/pinctrl-sunxi.c b/drivers/pinctrl/sunxi/pinctrl-sunxi.c index e42a3a0005a7..534c42ee0718 100644 --- a/drivers/pinctrl/sunxi/pinctrl-sunxi.c +++ b/drivers/pinctrl/sunxi/pinctrl-sunxi.c @@ -777,11 +777,10 @@ static int sunxi_pmx_request(struct pinctrl_dev *pctldev, unsigned offset) snprintf(supply, sizeof(supply), "vcc-p%c", 'a' + bank); reg = regulator_get(pctl->dev, supply); - if (IS_ERR(reg)) { - dev_err(pctl->dev, "Couldn't get bank P%c regulator\n", - 'A' + bank); - return PTR_ERR(reg); - } + if (IS_ERR(reg)) + return dev_err_probe(pctl->dev, PTR_ERR(reg), + "Couldn't get bank P%c regulator\n", + 'A' + bank); ret = regulator_enable(reg); if (ret) {