From patchwork Sun Mar 26 08:29:33 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Christophe JAILLET X-Patchwork-Id: 75025 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:a59:b0ea:0:b0:3b6:4342:cba0 with SMTP id b10csp830602vqo; Sun, 26 Mar 2023 01:56:33 -0700 (PDT) X-Google-Smtp-Source: AKy350alqtENnWs/YyHzAWJBbYzITH134iQMPNN9U5Ti5ZTPjid3FdKKiSsAghNeAWZROj+GcpY4 X-Received: by 2002:a17:906:13c7:b0:932:c1e2:998b with SMTP id g7-20020a17090613c700b00932c1e2998bmr8808563ejc.15.1679820993009; Sun, 26 Mar 2023 01:56:33 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1679820992; cv=none; d=google.com; s=arc-20160816; b=jXkaZ8kWZt/yAZBvRcRw6s/TNCONBSqTQUXIXKaP+gxbjuf0h9pdCnV7zjjn8z4Ul5 wLlMef5KVTlxNzzXUfVliB4pbQxt1o4Yg4E9g2xjxGb5ASdDIcri/kvui1Xm5TMoSARb xNmDjl3M6RrophtVTEPhXYpbeocHzBnLYjwf/G0Y1beOBw8C61/OqWEbZZr6EsbvJqoA PvCrXWjfaSd1ufZ7AA/0e1uDS3dkKN226sVo/HC+vJBapW276E0O1DswDZdOWaYKDJbx Hf4wXyCHU+eDtpAWP11z16OfUYTCzKoyhqwTrk050qTta4dfwfW9pQoAsld+G3pJrpCr LiXA== 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 :message-id:date:subject:cc:to:from; bh=h1KpSST+jvHPwRNenZK/KGvxTg1nglJ875P72Q6cbpo=; b=ykzspLF8RdxirCcACAUnhjCzU3uyZ+jLgaiJOF6WwgN/OEqUXXmpStgkhL+Ke76j/j 5kDctlBBeZXFgjPVTYQ+YH4gHtoxkAO4mqe4ssWxs8ZiUdHgyRZzfVDZYRw/hsnhg6i2 0y/84FBItNBYV0Aev2Yuxhx1023tVLEufeHXDMtbvTzWVwrX6JFozArkVwAOgi9xLkK6 RFXJW1LCMVM4D0DgG6qx8oJDchsrASEew/AlYOUxx47YwM8x/7fN9+8+bQlfEzNKHvTN mgizCRj/v+XpVfZOAafPkry5+IYRnswlIc0gLaRt3j2erwc/M56rPoo7yK5U3py0hEBA j2vg== ARC-Authentication-Results: i=1; mx.google.com; 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 Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id hd43-20020a17090796ab00b0093e5b108711si5604814ejc.942.2023.03.26.01.56.10; Sun, 26 Mar 2023 01:56:32 -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; 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 Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S231681AbjCZI3n (ORCPT + 99 others); Sun, 26 Mar 2023 04:29:43 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:40512 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229582AbjCZI3m (ORCPT ); Sun, 26 Mar 2023 04:29:42 -0400 Received: from smtp.smtpout.orange.fr (smtp-18.smtpout.orange.fr [80.12.242.18]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id A15499ED7 for ; Sun, 26 Mar 2023 01:29:39 -0700 (PDT) Received: from pop-os.home ([86.243.2.178]) by smtp.orange.fr with ESMTPA id gLkupDy9ezvWygLkupaLgV; Sun, 26 Mar 2023 10:29:37 +0200 X-ME-Helo: pop-os.home X-ME-Auth: Y2hyaXN0b3BoZS5qYWlsbGV0QHdhbmFkb28uZnI= X-ME-Date: Sun, 26 Mar 2023 10:29:37 +0200 X-ME-IP: 86.243.2.178 From: Christophe JAILLET To: Liam Girdwood , Mark Brown , Philippe Schenker Cc: linux-kernel@vger.kernel.org, kernel-janitors@vger.kernel.org, Christophe JAILLET Subject: [PATCH] regulator: Handle deferred clk Date: Sun, 26 Mar 2023 10:29:33 +0200 Message-Id: <18459fae3d017a66313699c7c8456b28158b2dd0.1679819354.git.christophe.jaillet@wanadoo.fr> X-Mailer: git-send-email 2.34.1 MIME-Version: 1.0 X-Spam-Status: No, score=-0.0 required=5.0 tests=RCVD_IN_DNSWL_NONE, RCVD_IN_MSPIKE_H3,RCVD_IN_MSPIKE_WL,SPF_HELO_PASS,SPF_PASS autolearn=unavailable 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?1761419977102947822?= X-GMAIL-MSGID: =?utf-8?q?1761419977102947822?= devm_clk_get() can return -EPROBE_DEFER. So it is better to return the error code from devm_clk_get(), instead of a hard coded -ENOENT. This gives more opportunities to successfully probe the driver. Fixes: 8959e5324485 ("regulator: fixed: add possibility to enable by clock") Signed-off-by: Christophe JAILLET --- drivers/regulator/fixed.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/regulator/fixed.c b/drivers/regulator/fixed.c index e3436f49dea4..364d1a2683b7 100644 --- a/drivers/regulator/fixed.c +++ b/drivers/regulator/fixed.c @@ -215,7 +215,7 @@ static int reg_fixed_voltage_probe(struct platform_device *pdev) drvdata->enable_clock = devm_clk_get(dev, NULL); if (IS_ERR(drvdata->enable_clock)) { dev_err(dev, "Can't get enable-clock from devicetree\n"); - return -ENOENT; + return PTR_ERR(drvdata->enable_clock); } } else if (drvtype && drvtype->has_performance_state) { drvdata->desc.ops = &fixed_voltage_domain_ops;