Received: by 2002:a05:6358:1087:b0:cb:c9d3:cd90 with SMTP id j7csp1532473rwi; Thu, 20 Oct 2022 13:47:34 -0700 (PDT) X-Google-Smtp-Source: AMsMyM659d2fA7S91vghBpeLL+io7QbCLFCb4iOCB5XX4Vyou5u/NQeh6FO3RBA37V1E8oc8POdA X-Received: by 2002:aa7:c054:0:b0:453:98c6:f6c4 with SMTP id k20-20020aa7c054000000b0045398c6f6c4mr13861273edo.2.1666298854027; Thu, 20 Oct 2022 13:47:34 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1666298854; cv=none; d=google.com; s=arc-20160816; b=RdQjQuKQWV2nfml1GQV1GDA1zZhl9bLQsbKjb54KTqU8qByHLUU2E51akakBJlQ1iN MfDs2O+RjMe4Ggbe7Y4Y8Ar34Ty3cuZJvsk86n1N/ULgEkiGWsU+KQWarRXA8SjpRHAo JK4dZ2sqfG1Rq2466CvQrQsPT/u6ywhQ5kNL7PAyMRWhtrwQum1lWLf7I9rymu8TkAAZ ADSqnqF07F97SMiNGVXCZFqSx7h48lcbi16vee/4beVLoAX/I0fqtARg0LWkpBCi1kf8 hd1XWykOr5p1xHpMmp/ptpShiGSU2aroJGDaoKqV5OuBvKFJh/UbEtymGQ0k5yaUNl6l 9DvA== 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 Return-Path: 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.47.08; Thu, 20 Oct 2022 13:47:34 -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 Content-Transfer-Encoding: 8bit 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 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; -- 2.35.1