From patchwork Thu Oct 20 20:42:49 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Sebastian Reichel X-Patchwork-Id: 6386 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:a5d:4242:0:0:0:0:0 with SMTP id s2csp315370wrr; Thu, 20 Oct 2022 13:46:42 -0700 (PDT) X-Google-Smtp-Source: AMsMyM5VNNMLM2l8lXuqBTrK0etDTNSY7Jeecc6vpwZoXrhnTRzJkMVSYWUF1pqFlHuK0Bq0eKHW X-Received: by 2002:a17:907:3186:b0:777:3fe7:4659 with SMTP id xe6-20020a170907318600b007773fe74659mr12424527ejb.336.1666298802400; Thu, 20 Oct 2022 13:46:42 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1666298802; cv=none; d=google.com; s=arc-20160816; b=EBAv1Xdw9o7ZX1NM1BbXJpY903dgtUk7vVK+a8B6+8C59HRDITzMIq8PsOBdIy7yrh nRTkVy0ehgEH5bJfJc3rN1y8VbhCgtrqhPsI+HCYpjdAXOnyEdWYBjaWMxWbdAzEfNwx cNZ3NpEZmgUsceZfm73zskEh3dfb0PZSoG6Boe7K+LgRqyO/0wq7N2zc4MOOKepN72jw 4qmVZ4wDcCGquNgbUNCtxKx5793GRV+/usyTwAgF+b+9yPvWvfpSfqYvbkOmbpLVkXqK jwS+uPXQWZxFwzg+HEH6mb/LCL4H1tc4o/Bx5PyB7vLeND5MpdrD9OUWVmRyTFty/tzV yu4g== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:mime-version :references:in-reply-to:message-id:date:subject:cc:to:from :dkim-signature; bh=M6Jrc7Ggpwe62Umsq8G1R3jw9kpu1fVFKCYBeDn1G+s=; b=Ysd2ixcoi+k+50aBb56Hj0T2l73ajnIAd8Qws5RZZhNW/cxm6wBJtnVkswpwu6wXCq ypFMywwK3cgIaxV0+h8FGcF8ewTSvNPXYyTtbr/Sx0fYEeyVXa8ibKbDOvQiPORARrPn B23zS0uDUiELuquxn10oBEUM2KFqfKZGT87Bgt/HvINX7wB/zP95tlEIyio58GpvVKcI xISMz1gs1mXA0myTuutfwLA1NbL7rCKB/bvgccYT9GUOZvKZLd3EZR/fqYPY8LFDiQvS 77oTbfUq5q0ksrT5Nse0ivd9aANEg+37C/4GYVJVuRVXX8nBfAZQAJEcBUsfAH8EDTMN YRRw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@collabora.com header.s=mail header.b=YS8m+Io1; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=collabora.com Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id he6-20020a1709073d8600b0078d9c781853si18456676ejc.607.2022.10.20.13.46.17; Thu, 20 Oct 2022 13:46:42 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; dkim=pass header.i=@collabora.com header.s=mail header.b=YS8m+Io1; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=collabora.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S229885AbiJTUnz (ORCPT + 99 others); Thu, 20 Oct 2022 16:43:55 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:34022 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229746AbiJTUnO (ORCPT ); Thu, 20 Oct 2022 16:43:14 -0400 Received: from madras.collabora.co.uk (madras.collabora.co.uk [IPv6:2a00:1098:0:82:1000:25:2eeb:e5ab]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 5D6FA20C990; Thu, 20 Oct 2022 13:43:12 -0700 (PDT) Received: from jupiter.universe (dyndsl-091-096-059-009.ewe-ip-backbone.de [91.96.59.9]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits)) (No client certificate requested) (Authenticated sender: sre) by madras.collabora.co.uk (Postfix) with ESMTPSA id 71B0F6602542; Thu, 20 Oct 2022 21:42:57 +0100 (BST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=collabora.com; s=mail; t=1666298577; bh=TH5RKawR8fUzI9ml8ZupcHOujoAZfQCPkmxXhLYxYXk=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=YS8m+Io1N5iGo+oUb06XsEGo/O8Wnd11migN+2lOJ7v61WtNSbIryRkUk7jCaTOhn 2/w7ZmqLQOgsi6tmIfUzAaKDUx+JdoMMCus5ttIaRdLdJ4zMRtcTE29tX5ukXjlkhV p+J6MECb37kApdzNR4MDelWdXWTvR93raciHztPXjGdwYqA5NECuSCz9vYifw44oM5 3QHG09ehHYqEapxs+qdYXF4vdC8y8jDTWJKt/TE/dFmgE2AXKEaybi263RGTQQ8Pt1 UEG0uzFZRYJSQC/uB8fdLMbnExSbuwOSd04GLebm+f2AOcIl7jGf5m3zAjmS+x0vw1 Kpd/jVnBjAN5g== Received: by jupiter.universe (Postfix, from userid 1000) id 66A664808A0; Thu, 20 Oct 2022 22:42:52 +0200 (CEST) From: Sebastian Reichel To: Heiko Stuebner , Rob Herring , Krzysztof Kozlowski , Lee Jones Cc: Michael Turquette , Stephen Boyd , Linus Walleij , Mark Brown , Liam Girdwood , Alexandre Belloni , Alessandro Zummo , linux-rockchip@lists.infradead.org, devicetree@vger.kernel.org, linux-kernel@vger.kernel.org, Sebastian Reichel , kernel@collabora.com Subject: [PATCHv4 11/13] regulator: rk808: Use dev_err_probe Date: Thu, 20 Oct 2022 22:42:49 +0200 Message-Id: <20221020204251.108565-12-sebastian.reichel@collabora.com> X-Mailer: git-send-email 2.35.1 In-Reply-To: <20221020204251.108565-1-sebastian.reichel@collabora.com> References: <20221020204251.108565-1-sebastian.reichel@collabora.com> MIME-Version: 1.0 X-Spam-Status: No, score=-2.1 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,SPF_HELO_NONE,SPF_PASS, URIBL_BLOCKED autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org X-getmail-retrieved-from-mailbox: =?utf-8?q?INBOX?= X-GMAIL-THRID: =?utf-8?q?1747240932921464904?= X-GMAIL-MSGID: =?utf-8?q?1747240932921464904?= Print error message for potential EPROBE_DEFER error using dev_err_probe, which captures the reason in /sys/kernel/debug/devices_deferred and otherwise silences the message. Signed-off-by: Sebastian Reichel --- drivers/regulator/rk808-regulator.c | 8 +++----- 1 file changed, 3 insertions(+), 5 deletions(-) diff --git a/drivers/regulator/rk808-regulator.c b/drivers/regulator/rk808-regulator.c index ce9c64cadeba..fa9fc1aa1ae3 100644 --- a/drivers/regulator/rk808-regulator.c +++ b/drivers/regulator/rk808-regulator.c @@ -1343,11 +1343,9 @@ static int rk808_regulator_probe(struct platform_device *pdev) for (i = 0; i < nregulators; i++) { rk808_rdev = devm_regulator_register(&pdev->dev, ®ulators[i], &config); - if (IS_ERR(rk808_rdev)) { - dev_err(&pdev->dev, - "failed to register %d regulator\n", i); - return PTR_ERR(rk808_rdev); - } + if (IS_ERR(rk808_rdev)) + return dev_err_probe(&pdev->dev, PTR_ERR(rk808_rdev), + "failed to register %d regulator\n", i); } return 0;