Message ID | b3d9dac978f1e2e42a40ec61f58aa98c44c85dfd.1670741386.git.christophe.jaillet@wanadoo.fr |
---|---|
State | New |
Headers |
Return-Path: <linux-kernel-owner@vger.kernel.org> Delivered-To: ouuuleilei@gmail.com Received: by 2002:adf:f944:0:0:0:0:0 with SMTP id q4csp1651816wrr; Sat, 10 Dec 2022 23:09:15 -0800 (PST) X-Google-Smtp-Source: AA0mqf50UTDxbraVH2rlbm0Up1RgNFBUAix1Qv5azCralUW9BpXQ7hoz/HulVx1VFCC7B7cH3pZj X-Received: by 2002:a05:6a20:9f4b:b0:a3:8d47:6aa9 with SMTP id ml11-20020a056a209f4b00b000a38d476aa9mr16148819pzb.34.1670742555291; Sat, 10 Dec 2022 23:09:15 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1670742555; cv=none; d=google.com; s=arc-20160816; b=sUuaerksJD5pzTdPe7vB0DGpZSGRMjAWXq2BlJyh7GKYF0Q2ZDSQxUMBFdyO8aBIDA JE0ola21bjSkrnxOhPsFct2DDDzD3tk/cTEvObcpmQKVU5vffSDPkHEoXLUzE/mLVDRd NOAfeSk1dr7iAgQy+4rH+VXEY8EKoVsU2DaqFM6pTMRx0oyvVVyKphE8VOK85Ol1E0ZG +fB0FWHwdz9zGLwYXFSGHFtCrUSGNTXKTiPCGx2sm1v17MivCelolelCqH2FE506NSsl EF/a5TSeMtbcJQx2EMOgjF3WSbYxy7olI3tv5RTiaf+ov1MsR00kyM6nsv0zWo56ojeP t5nw== 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=tjuJfgOS/2V8KUQivjkvbB2cIat8hJhOjGkDW0xWebo=; b=RdYYBvVAzNumTpaTX5JDvt6IlIZuAtj60CfA3yFeNiSyihiAgBlgdq3paJ0qrqsW5L v4t0nkru5blrm/BnVuxIHh5bRR2HhaItO8GgLN4GhsP5TLlNHbNVDaM4rXHjdjlz5DFs 918zU2YA/RxaVyQEPSBgYgOwWTtJ0viXXKL5mOIW1c00N/ZJmYzdo9p/EX9cudGtCJvD k4GtDmlKDRNrJHUI1OK9iawyAohgRK0PR8lpSLftQjmulO7+HGU62Gl3yd9qosg3XiKK AlIFfaiOWPyfAP6h18WdZ0toBuT8Qh77e/WIn84w0YKrLGrirGRRYpmPmjZMxJojE4zK sAhQ== 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 c66-20020a633545000000b00478c5d37cdcsi6007949pga.743.2022.12.10.23.09.02; Sat, 10 Dec 2022 23:09:15 -0800 (PST) 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 S229900AbiLKGuU (ORCPT <rfc822;baris.duru.linux@gmail.com> + 99 others); Sun, 11 Dec 2022 01:50:20 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:39284 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229835AbiLKGuQ (ORCPT <rfc822;linux-kernel@vger.kernel.org>); Sun, 11 Dec 2022 01:50:16 -0500 Received: from smtp.smtpout.orange.fr (smtp-26.smtpout.orange.fr [80.12.242.26]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id B15F1FAFC for <linux-kernel@vger.kernel.org>; Sat, 10 Dec 2022 22:50:13 -0800 (PST) Received: from pop-os.home ([86.243.100.34]) by smtp.orange.fr with ESMTPA id 4GA4pPlLH5FWA4GA4pDe1A; Sun, 11 Dec 2022 07:50:10 +0100 X-ME-Helo: pop-os.home X-ME-Auth: Y2hyaXN0b3BoZS5qYWlsbGV0QHdhbmFkb28uZnI= X-ME-Date: Sun, 11 Dec 2022 07:50:10 +0100 X-ME-IP: 86.243.100.34 From: Christophe JAILLET <christophe.jaillet@wanadoo.fr> To: Rob Clark <robdclark@gmail.com>, Abhinav Kumar <quic_abhinavk@quicinc.com>, Dmitry Baryshkov <dmitry.baryshkov@linaro.org>, Sean Paul <sean@poorly.run>, David Airlie <airlied@gmail.com>, Daniel Vetter <daniel@ffwll.ch> Cc: linux-kernel@vger.kernel.org, kernel-janitors@vger.kernel.org, Christophe JAILLET <christophe.jaillet@wanadoo.fr>, linux-arm-msm@vger.kernel.org, dri-devel@lists.freedesktop.org, freedreno@lists.freedesktop.org Subject: [PATCH] drm/msm/hdm: Fix the error handling path of msm_hdmi_dev_probe() Date: Sun, 11 Dec 2022 07:50:06 +0100 Message-Id: <b3d9dac978f1e2e42a40ec61f58aa98c44c85dfd.1670741386.git.christophe.jaillet@wanadoo.fr> X-Mailer: git-send-email 2.34.1 MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Spam-Status: No, score=-1.9 required=5.0 tests=BAYES_00,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: <linux-kernel.vger.kernel.org> X-Mailing-List: linux-kernel@vger.kernel.org X-getmail-retrieved-from-mailbox: =?utf-8?q?INBOX?= X-GMAIL-THRID: =?utf-8?q?1751900545755175993?= X-GMAIL-MSGID: =?utf-8?q?1751900545755175993?= |
Series |
drm/msm/hdm: Fix the error handling path of msm_hdmi_dev_probe()
|
|
Commit Message
Christophe JAILLET
Dec. 11, 2022, 6:50 a.m. UTC
If an error occurs after a successful msm_hdmi_get_phy() call, it must be
undone by a corresponding msm_hdmi_put_phy(), as already done in the
remove function.
Fixes: 437365464043 ("drm/msm/hdmi: move msm_hdmi_get_phy() to msm_hdmi_dev_probe()")
Signed-off-by: Christophe JAILLET <christophe.jaillet@wanadoo.fr>
---
Not sure if the Fixes tag is correct. At least it is when the probe needs
to be fixed but the issue was maybe there elsewhere before.
---
drivers/gpu/drm/msm/hdmi/hdmi.c | 12 ++++++++++--
1 file changed, 10 insertions(+), 2 deletions(-)
Comments
On 12/10/2022 10:50 PM, Christophe JAILLET wrote: > If an error occurs after a successful msm_hdmi_get_phy() call, it must be > undone by a corresponding msm_hdmi_put_phy(), as already done in the > remove function. > > Fixes: 437365464043 ("drm/msm/hdmi: move msm_hdmi_get_phy() to msm_hdmi_dev_probe()") > Signed-off-by: Christophe JAILLET <christophe.jaillet@wanadoo.fr> Reviewed-by: Abhinav Kumar <quic_abhinavk@quicinc.com> > --- > Not sure if the Fixes tag is correct. At least it is when the probe needs > to be fixed but the issue was maybe there elsewhere before. Seems right to me. > --- > drivers/gpu/drm/msm/hdmi/hdmi.c | 12 ++++++++++-- > 1 file changed, 10 insertions(+), 2 deletions(-) > > diff --git a/drivers/gpu/drm/msm/hdmi/hdmi.c b/drivers/gpu/drm/msm/hdmi/hdmi.c > index 4d3fdc806bef..97372bb241d8 100644 > --- a/drivers/gpu/drm/msm/hdmi/hdmi.c > +++ b/drivers/gpu/drm/msm/hdmi/hdmi.c > @@ -532,11 +532,19 @@ static int msm_hdmi_dev_probe(struct platform_device *pdev) > > ret = devm_pm_runtime_enable(&pdev->dev); > if (ret) > - return ret; > + goto err_put_phy; > > platform_set_drvdata(pdev, hdmi); > > - return component_add(&pdev->dev, &msm_hdmi_ops); > + ret = component_add(&pdev->dev, &msm_hdmi_ops); > + if (ret) > + goto err_put_phy; > + > + return 0; > + > +err_put_phy: > + msm_hdmi_put_phy(hdmi); > + return ret; > } > > static int msm_hdmi_dev_remove(struct platform_device *pdev)
On 12/12/2022 5:34 PM, Abhinav Kumar wrote: > > > On 12/10/2022 10:50 PM, Christophe JAILLET wrote: >> If an error occurs after a successful msm_hdmi_get_phy() call, it must be >> undone by a corresponding msm_hdmi_put_phy(), as already done in the >> remove function. >> >> Fixes: 437365464043 ("drm/msm/hdmi: move msm_hdmi_get_phy() to >> msm_hdmi_dev_probe()") >> Signed-off-by: Christophe JAILLET <christophe.jaillet@wanadoo.fr> > > Reviewed-by: Abhinav Kumar <quic_abhinavk@quicinc.com> Actually, i missed one nit In the subject line, it should be "drm/msm/hdmi" The "i" is missing. Please fix that and post it. > >> --- >> Not sure if the Fixes tag is correct. At least it is when the probe needs >> to be fixed but the issue was maybe there elsewhere before. > > Seems right to me. > >> --- >> drivers/gpu/drm/msm/hdmi/hdmi.c | 12 ++++++++++-- >> 1 file changed, 10 insertions(+), 2 deletions(-) >> >> diff --git a/drivers/gpu/drm/msm/hdmi/hdmi.c >> b/drivers/gpu/drm/msm/hdmi/hdmi.c >> index 4d3fdc806bef..97372bb241d8 100644 >> --- a/drivers/gpu/drm/msm/hdmi/hdmi.c >> +++ b/drivers/gpu/drm/msm/hdmi/hdmi.c >> @@ -532,11 +532,19 @@ static int msm_hdmi_dev_probe(struct >> platform_device *pdev) >> ret = devm_pm_runtime_enable(&pdev->dev); >> if (ret) >> - return ret; >> + goto err_put_phy; >> platform_set_drvdata(pdev, hdmi); >> - return component_add(&pdev->dev, &msm_hdmi_ops); >> + ret = component_add(&pdev->dev, &msm_hdmi_ops); >> + if (ret) >> + goto err_put_phy; >> + >> + return 0; >> + >> +err_put_phy: >> + msm_hdmi_put_phy(hdmi); >> + return ret; >> } >> static int msm_hdmi_dev_remove(struct platform_device *pdev)
diff --git a/drivers/gpu/drm/msm/hdmi/hdmi.c b/drivers/gpu/drm/msm/hdmi/hdmi.c index 4d3fdc806bef..97372bb241d8 100644 --- a/drivers/gpu/drm/msm/hdmi/hdmi.c +++ b/drivers/gpu/drm/msm/hdmi/hdmi.c @@ -532,11 +532,19 @@ static int msm_hdmi_dev_probe(struct platform_device *pdev) ret = devm_pm_runtime_enable(&pdev->dev); if (ret) - return ret; + goto err_put_phy; platform_set_drvdata(pdev, hdmi); - return component_add(&pdev->dev, &msm_hdmi_ops); + ret = component_add(&pdev->dev, &msm_hdmi_ops); + if (ret) + goto err_put_phy; + + return 0; + +err_put_phy: + msm_hdmi_put_phy(hdmi); + return ret; } static int msm_hdmi_dev_remove(struct platform_device *pdev)