From patchwork Wed Aug 31 21:54:35 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Sebastian Reichel X-Patchwork-Id: 601535 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 vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id 46577ECAAD1 for ; Wed, 31 Aug 2022 21:55:09 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S232374AbiHaVzG (ORCPT ); Wed, 31 Aug 2022 17:55:06 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:34676 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S231211AbiHaVy4 (ORCPT ); Wed, 31 Aug 2022 17:54:56 -0400 Received: from madras.collabora.co.uk (madras.collabora.co.uk [46.235.227.172]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 981C455B6; Wed, 31 Aug 2022 14:54:54 -0700 (PDT) Received: from jupiter.universe (dyndsl-091-096-057-024.ewe-ip-backbone.de [91.96.57.24]) (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 6A9C26601E7E; Wed, 31 Aug 2022 22:54:47 +0100 (BST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=collabora.com; s=mail; t=1661982887; bh=TH5RKawR8fUzI9ml8ZupcHOujoAZfQCPkmxXhLYxYXk=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=OmdxudNx3YQj2/C9zPkFvfoFlgm965vEo2bVLuT+l4xTPLgA/M5ozdeQztsIGw1Eb P5vjjOCvOPC6zwkj/OI0PGkVN4bjyvMSGCiAzeSavym4ILN7WPMy9Adxj2GzxVcpLR 9MSIWRcxPdqJKxZYI1jhA3OpGYSPbkgzBh4rZYIWAOkZS0+DUoRN9UkkpRqWz8J26B 0jgSF3Kn7XjKMYmOXFUJIdxubGWwgmgeYaasseSh7nNbj8yPSWgyf7YYBuMOnbzpsh 922jOzeC2DE0qk0IauT5b/5Czta9Z+398ivK33ieox+LaAntKMg3zCK6BopmZYgUAX g2SJOc6mMzy3g== Received: by jupiter.universe (Postfix, from userid 1000) id 474A9481225; Wed, 31 Aug 2022 23:54:43 +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: [PATCH 11/13] regulator: rk808: Use dev_err_probe Date: Wed, 31 Aug 2022 23:54:35 +0200 Message-Id: <20220831215437.117880-12-sebastian.reichel@collabora.com> X-Mailer: git-send-email 2.35.1 In-Reply-To: <20220831215437.117880-1-sebastian.reichel@collabora.com> References: <20220831215437.117880-1-sebastian.reichel@collabora.com> MIME-Version: 1.0 Precedence: bulk List-ID: X-Mailing-List: devicetree@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;