Received: by 2002:a05:6358:d09b:b0:dc:cd0c:909e with SMTP id jc27csp7631082rwb; Mon, 12 Dec 2022 18:06:36 -0800 (PST) X-Google-Smtp-Source: AA0mqf70aizmES7/r/X3JFaVHAGY5eTNlnN74Q4o7kU20jS7b5hkiP7D+GZJays7duLr1m8xPkMs X-Received: by 2002:a17:90a:d714:b0:21a:2d8:bf98 with SMTP id y20-20020a17090ad71400b0021a02d8bf98mr18310500pju.10.1670897195910; Mon, 12 Dec 2022 18:06:35 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1670897195; cv=none; d=google.com; s=arc-20160816; b=w8i6SPGuhPv3nVg4dpSmjaQYHj/KB1nNOOpHPQ3Txo4NA7EunNtYj38xsi+n3hgivU ojf+mcD9RfPeMZUQHSLRambZH4uVbQs08otsjDiRN+fzZwOq3RWPzUnHvpSUw4lQVV3z doztN2uJ4Mxf0ypqk0QKp2p7EGnE3oSyk1+WcynweFXeuRoGzm3OA4EplBRcI1vZyf8e LhD6Sfq1utG0lCLwOWFjYWpWjHI9Fevh4bohbMZgWkl6oeE3HhCWEIjL4uRI0ubKIMuR GKFmh03dkQ2anp7zEefcuubbI1cyNyTdruVqWhIjCS4MfhgLTfssJZndZM7vm7CNJQi5 QPmg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:in-reply-to:references :cc:to:from:content-language:subject:user-agent:mime-version:date :message-id:dkim-signature; bh=pCZeAfDoRhwWqONc4flZx60RTmPIhwedWOry2zw04m8=; b=ZFWTp+TLND8s0LMAXAv0uRksx3NlYfKLV27Ifn0u7o79bIGXT2HE/PjRS8MQjYvcX0 Ew6ZMSgdkgTWRS7Tm3kvFr6y4O5xDsxio8yGMgDulCiaFdGI8RuEYzFjUmYIQcfR8Acq z+tAWel0I0ndoGMWXPWC9QZbzFUByU0egm0/rYE0Syh2hCmo3fWIgo1xWeE07JdZE8WG A12NFndzcfuxQMQOVabuUnD+n3C2ftR8/1d8h51mkhpoc3Q6tKuUye4/h8KoDqWhkKHm q8CV6MM157u2JMC03pWADrVuQv5nDbQ0zBPNFeP6KZD/pMJwTK9HL2Dt/GNg5h3qufF1 p7ng== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@quicinc.com header.s=qcppdkim1 header.b=ESnm0JDY; 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=quicinc.com Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id ls15-20020a17090b350f00b002192a6c09d5si12190719pjb.10.2022.12.12.18.06.26; Mon, 12 Dec 2022 18:06:35 -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; dkim=pass header.i=@quicinc.com header.s=qcppdkim1 header.b=ESnm0JDY; 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=quicinc.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S234161AbiLMBgL (ORCPT + 74 others); Mon, 12 Dec 2022 20:36:11 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:52060 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S234163AbiLMBgI (ORCPT ); Mon, 12 Dec 2022 20:36:08 -0500 Received: from mx0b-0031df01.pphosted.com (mx0b-0031df01.pphosted.com [205.220.180.131]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 71B151D32D; Mon, 12 Dec 2022 17:36:07 -0800 (PST) Received: from pps.filterd (m0279868.ppops.net [127.0.0.1]) by mx0a-0031df01.pphosted.com (8.17.1.19/8.17.1.19) with ESMTP id 2BD1KIIc002952; Tue, 13 Dec 2022 01:36:03 GMT DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=quicinc.com; h=message-id : date : mime-version : subject : from : to : cc : references : in-reply-to : content-type : content-transfer-encoding; s=qcppdkim1; bh=pCZeAfDoRhwWqONc4flZx60RTmPIhwedWOry2zw04m8=; b=ESnm0JDYvat8UpXraksERXMqs2Kj/Hl8XfKh3gRys+XF7yzraas7zLQqRa/1ZDGyGwat MK0l50xPL+2Gr0v8KfdYMqpwew3Ts6JqZnq+jvI7D5TeD/tb2foZfDlAGqfH9czfIoF1 qL5+GYIZagzoACiWw4L1taWnjIcfP1c+vt4yzfB8q/yMgJEGXQSQYypDw+7/OAiWuPZq fdMBEZRhPa89inkvf6VKasKjLQZ7PRVF10WUlwE6MJBF+UaFKF28pPKL+nmXLkCXHCf3 jPMD5uXteUh47bd4nRBLjIKHeO+Uifyw8ba8zeYaj1Fozf/gQg1k7QhIXrx3yHMVf/oh LA== Received: from nalasppmta02.qualcomm.com (Global_NAT1.qualcomm.com [129.46.96.20]) by mx0a-0031df01.pphosted.com (PPS) with ESMTPS id 3mchesdsy7-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT); Tue, 13 Dec 2022 01:36:03 +0000 Received: from nalasex01a.na.qualcomm.com (nalasex01a.na.qualcomm.com [10.47.209.196]) by NALASPPMTA02.qualcomm.com (8.17.1.5/8.17.1.5) with ESMTPS id 2BD1a2c2022801 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT); Tue, 13 Dec 2022 01:36:02 GMT Received: from [10.111.167.12] (10.80.80.8) by nalasex01a.na.qualcomm.com (10.47.209.196) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.2.986.36; Mon, 12 Dec 2022 17:36:00 -0800 Message-ID: <46c1f014-7c3f-88c4-d576-7b6bd5e1590d@quicinc.com> Date: Mon, 12 Dec 2022 17:35:58 -0800 MIME-Version: 1.0 User-Agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:91.0) Gecko/20100101 Thunderbird/91.6.2 Subject: Re: [Freedreno] [PATCH] drm/msm/hdm: Fix the error handling path of msm_hdmi_dev_probe() Content-Language: en-US From: Abhinav Kumar To: Christophe JAILLET , Rob Clark , Dmitry Baryshkov , Sean Paul , David Airlie , Daniel Vetter CC: , , , , References: In-Reply-To: Content-Type: text/plain; charset="UTF-8"; format=flowed Content-Transfer-Encoding: 8bit X-Originating-IP: [10.80.80.8] X-ClientProxiedBy: nasanex01b.na.qualcomm.com (10.46.141.250) To nalasex01a.na.qualcomm.com (10.47.209.196) X-QCInternal: smtphost X-Proofpoint-Virus-Version: vendor=nai engine=6200 definitions=5800 signatures=585085 X-Proofpoint-ORIG-GUID: QiioKxyM5fxSL8PC9z6BgRR-vYYuuoh5 X-Proofpoint-GUID: QiioKxyM5fxSL8PC9z6BgRR-vYYuuoh5 X-Proofpoint-Virus-Version: vendor=baseguard engine=ICAP:2.0.205,Aquarius:18.0.923,Hydra:6.0.545,FMLib:17.11.122.1 definitions=2022-12-12_02,2022-12-12_02,2022-06-22_01 X-Proofpoint-Spam-Details: rule=outbound_notspam policy=outbound score=0 malwarescore=0 phishscore=0 bulkscore=0 spamscore=0 adultscore=0 priorityscore=1501 lowpriorityscore=0 impostorscore=0 mlxscore=0 mlxlogscore=999 suspectscore=0 clxscore=1015 classifier=spam adjust=0 reason=mlx scancount=1 engine=8.12.0-2210170000 definitions=main-2212130014 X-Spam-Status: No, score=-2.1 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,NICE_REPLY_A,SPF_HELO_NONE, SPF_PASS 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 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 > > Reviewed-by: Abhinav Kumar 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)