Received: by 2002:a05:6358:489b:b0:bb:da1:e618 with SMTP id x27csp336014rwn; Wed, 7 Sep 2022 17:52:28 -0700 (PDT) X-Google-Smtp-Source: AA6agR7jezvZ5M0RWB0j+wQy6Kyc0kYLO/iGC3LQsNsgfu4E/2bsLx+jdBM6m3YtTQaU1Pq8WuXx X-Received: by 2002:a05:6402:2791:b0:448:763c:666f with SMTP id b17-20020a056402279100b00448763c666fmr5122624ede.36.1662598348317; Wed, 07 Sep 2022 17:52:28 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1662598348; cv=none; d=google.com; s=arc-20160816; b=O6MgO8QxdeiyF5TisYsrOb0yo6vxUfDECReQ6Jr4tuirCjE1rbQGazwvl1L2hOgdVK Gmu7hj1LthcnMM6CdH+iD3jTCB5b5DUW4seYio7/ZzI5lGRzPLc/MysGZf3Idy6oc7vu ks4D2TPmwSZTsJpYjkFk/NFmQRuOnjYdY3yfbFg20nN3lcDi9ARVMDZJuGBXshsdV7qQ cpGbVt1JtOKJhgigY/SM2Lg1AIC4+BXymnGRif6jnWj9OQUvQMWCd3UwXaqO8DKR8/I2 3tL32tdng8glBYd/OJDGU6txGDnRNXaARH2cCTtroiORCzXgOipqOk8w/gzp2+lySKbN 7yOg== 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=FwsN9FhTMPMWx1Fee/ZTfRTsHkGka4AjvD4LNJmXaeg6qFdtfBgPcDBLPhB1/gFUIT VWU87XH2rhKoh19oz6TxMwJRtUfjCntgXil/eMRluQNNxPcW4UYX8iky+9nQvUxa/XFJ YrE90/5vrISekbCEhH73HNbYXqGsnQCBxFvw4qo/J8yJc3/FbORkDvLeYgohycnDxGpE DFYAZj9fDvuXD924BjlChjU8Nm/XTr86UU4CoQVgqdFUxi54lQnnx2sNRXFQbKQh+oxI zhNgJStXFtgvcc9BeHFcxUeD+DUxchUatG46WdNM+Mqpm9HVMTk8ysBbNgr2uNHm5Ybq CO4g== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@collabora.com header.s=mail header.b="GuB/f8o/"; 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 gb4-20020a170907960400b0073d61f9a7b6si913180ejc.263.2022.09.07.17.52.03; Wed, 07 Sep 2022 17:52:28 -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="GuB/f8o/"; 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 S230389AbiIHAcM (ORCPT + 99 others); Wed, 7 Sep 2022 20:32:12 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:45988 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S230258AbiIHAbT (ORCPT ); Wed, 7 Sep 2022 20:31:19 -0400 Received: from madras.collabora.co.uk (madras.collabora.co.uk [46.235.227.172]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 1E28B84EFC; Wed, 7 Sep 2022 17:31:18 -0700 (PDT) Received: from jupiter.universe (dyndsl-095-033-158-249.ewe-ip-backbone.de [95.33.158.249]) (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 BC8076601F80; Thu, 8 Sep 2022 01:31:14 +0100 (BST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=collabora.com; s=mail; t=1662597074; bh=TH5RKawR8fUzI9ml8ZupcHOujoAZfQCPkmxXhLYxYXk=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=GuB/f8o/u+ITQE3vCmryUVKLmiG1nzpeVNf2hF52sQTCjK+C0nIAawpweJu3CEJ0h Dgam1zZzBBBHkc1v2NSlwFg981d/cA+xp+D8J4qR5JcnWbAVHX0f19Hf8vyAlqkTDK DbGeqwcVj8zeBnJPDWvFe+J53eJU3PtOPYQzjShQEzRauOS0QWspf67eg9+0Bn4CUN 3BrPlt0gkOlFG9Q6buTlwImHqCupgBv1NnoChXZaFnAX30PzzT1aWa7VOYFP9hCtnz Pj9HtxVvZRzHZq5tHMPJ2qJad3zO6aorJD7M6+WNXv0rmzufDnadJnh5ty4rqb5ldz NKgNKnXWG9Txg== Received: by jupiter.universe (Postfix, from userid 1000) id 7713A4807A1; Thu, 8 Sep 2022 02:31:09 +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: [PATCHv2 11/13] regulator: rk808: Use dev_err_probe Date: Thu, 8 Sep 2022 02:31:05 +0200 Message-Id: <20220908003107.220143-12-sebastian.reichel@collabora.com> X-Mailer: git-send-email 2.35.1 In-Reply-To: <20220908003107.220143-1-sebastian.reichel@collabora.com> References: <20220908003107.220143-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, T_SCC_BODY_TEXT_LINE 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