Received: by 2002:a05:6a10:6d10:0:0:0:0 with SMTP id gq16csp855386pxb; Fri, 22 Apr 2022 12:42:44 -0700 (PDT) X-Google-Smtp-Source: ABdhPJyLX8YN0G298BDIO9PR4wprccwyWDjExBiU+j3HKygSsqIH6owgqlh4Srel3KGrIOQM/nlk X-Received: by 2002:a17:90a:1db:b0:1bf:711d:267a with SMTP id 27-20020a17090a01db00b001bf711d267amr7126427pjd.155.1650656563983; Fri, 22 Apr 2022 12:42:43 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1650656563; cv=none; d=google.com; s=arc-20160816; b=VPihM2t7bk8NsXBnyNbgxjuHcFce4kuDfkUTAKTmQiaUxYqrjH02X5f7NeUaFf7U2E HMMwqKi1Ciq106b/pE1I6kV4GgFMExx6uCFqMtUMD7o9SwhmFQLSdTJM+mYpo14pqVJx Gznnglr9/TvWAKzMoB0h5CrrBOwpMALquXdJ0nQ8c4gMIQfyeOoGqqVmw5l7jw0yfrwg JvQF0/e1qfJT1K0aFR/h5YbVlUhM2Z4YzHcy5TlxcJDRfv220//wEfP9mdS1c3fcgwFO IrUXmbDOFEtRxBhPu00T98uzGqyDg2UpDqFFZTWPD7QFY/OhKmk0hKqMCZBXwTKQFux+ EO2A== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:cc:to:subject:message-id:date:from:in-reply-to :references:mime-version:dkim-signature; bh=ZA1nLvyjkEKFlKU13Ct8Zcggn9No1V/TQja+nO/faEQ=; b=nbC8un8JM3075fQJTxPv+761jBUY0KjpcUKiz1zEtLtTJ96hloEXq0gJgJRNC4vF62 xCS0bdVOLi5iFZ92po/fcMGTW6EvGm1GucN0+CS6ESB4LSUtovEDxbU2TOyHk7zpWFae z+dSAGmRhd7YfDpGEZzoFYVHYSFXaYVE4X0terkdFQZgUrrrmMPCxbHVcupIcV3vmDEQ 4xXaok0CkWyG+6k8cATS6deVMc+Saq4ACfqxWJ1WEK9lRTK3iBYgCdZAJ86lGNJe0PO+ GCbK2pA/aXqP2cnkVut2wcRmLoN0VlCCD0rJ4SdzaX5OnZ705vG34AYnaDwZLQnTBoH2 sJ0w== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@gmail.com header.s=20210112 header.b=ktL17Cj6; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Return-Path: Received: from lindbergh.monkeyblade.net (lindbergh.monkeyblade.net. [2620:137:e000::1:18]) by mx.google.com with ESMTPS id n7-20020a170902d2c700b0015b3dbc18a5si4940001plc.92.2022.04.22.12.42.43 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 22 Apr 2022 12:42:43 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:18 as permitted sender) client-ip=2620:137:e000::1:18; Authentication-Results: mx.google.com; dkim=pass header.i=@gmail.com header.s=20210112 header.b=ktL17Cj6; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by lindbergh.monkeyblade.net (Postfix) with ESMTP id 9ECDE202B69; Fri, 22 Apr 2022 11:47:55 -0700 (PDT) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1387367AbiDUOZF (ORCPT + 99 others); Thu, 21 Apr 2022 10:25:05 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:60508 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1377277AbiDUOZE (ORCPT ); Thu, 21 Apr 2022 10:25:04 -0400 Received: from mail-oa1-x2b.google.com (mail-oa1-x2b.google.com [IPv6:2001:4860:4864:20::2b]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id CAFAD3CA61 for ; Thu, 21 Apr 2022 07:22:13 -0700 (PDT) Received: by mail-oa1-x2b.google.com with SMTP id 586e51a60fabf-e5c42b6e31so5491477fac.12 for ; Thu, 21 Apr 2022 07:22:13 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; h=mime-version:references:in-reply-to:from:date:message-id:subject:to :cc; bh=ZA1nLvyjkEKFlKU13Ct8Zcggn9No1V/TQja+nO/faEQ=; b=ktL17Cj6uxm1d8rlfHQmBEZKLnaSLLe5PpUY2ZqhnghpGiiTh+2K1s49i0J27IO6OP bNH73ajK8s32WdPHv4rQDkve1ZTTzunyr07WVpeunELbQajFXtZKjUOMh0vQeKogJV3X QmRE0CBsSIy1krXFTtFDOwJIYX9tqBmJYnEISGPOaj98kJz1AGPtWL8pHLx7nxKmTAXE StOoQZhEeq1h4Cir209U0ekOW81ntYRvcd3+kcQvhVOrnKsm+fqhG8VqVzsFal0syjzG kCtPnwa7aa7Rxoq672eRyaC7lYMRhDoN1XoZeMkua/VPICh3BB3iC/ea5qFG492kuzgF a7Hg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc; bh=ZA1nLvyjkEKFlKU13Ct8Zcggn9No1V/TQja+nO/faEQ=; b=mxVvAohRUPsjnDYAA2A0yHq9oPawygw1Nuj5ZtcF7YJcKX2SaOpmYmklj0CmHtC1Tm d3T6o3J2AJV4FcqWlGtXypYviYRyCRDPXW4hK7zoeL/E6lqepcDKd5MKcpuunz7yylNg +KZw7VoM0BCPlQZXFJvpSxbRB17gB4rLjqzQAJ5GGL2e8bakPb7vJSwxz8Zm2A1j9xzl fe/6LA+gjvSykHqGa7TLdOu79PikchCMYYcXM/+x1NuTPnJooMUfhQQd+XUoR1/0sQ+8 nljgHbtlIhBjpb59ty+D3U4m5S5qZ0s7N6lAdl5biI0OSwW4ySWuSOLBonu59pY7nxs7 ieNw== X-Gm-Message-State: AOAM532lwOApHchhr8fQwKJRoNWjVWDXp1Ogw04ve1mb2frg59BoIUpg trxNGO06pR6CSCLKZIDHCxTpClr7ROFBIPPO6Hg= X-Received: by 2002:a05:6870:311d:b0:de:9b6c:362b with SMTP id v29-20020a056870311d00b000de9b6c362bmr3772925oaa.200.1650550933142; Thu, 21 Apr 2022 07:22:13 -0700 (PDT) MIME-Version: 1.0 References: <20220421090313.24864-1-linmq006@gmail.com> In-Reply-To: <20220421090313.24864-1-linmq006@gmail.com> From: Alex Deucher Date: Thu, 21 Apr 2022 10:22:02 -0400 Message-ID: Subject: Re: [PATCH] drm/amd/display: Fix memory leak in dcn21_clock_source_create To: Miaoqian Lin Cc: Harry Wentland , Leo Li , Rodrigo Siqueira , Alex Deucher , =?UTF-8?Q?Christian_K=C3=B6nig?= , "Pan, Xinhui" , David Airlie , Daniel Vetter , Laktyushkin Dmytro , Solomon Chiu , Stylon Wang , Victor Lu , Ilya Bakoulin , Melissa Wen , Angus Wang , Fangzhi Zuo , Isabella Basso , Bhawanpreet Lakha , amd-gfx list , Maling list - DRI developers , LKML Content-Type: text/plain; charset="UTF-8" X-Spam-Status: No, score=-1.7 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,FREEMAIL_FORGED_FROMDOMAIN,FREEMAIL_FROM, HEADER_FROM_DIFFERENT_DOMAINS,MAILING_LIST_MULTI,RDNS_NONE, SPF_HELO_NONE autolearn=no 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 Applied. Thanks! Alex On Thu, Apr 21, 2022 at 5:03 AM Miaoqian Lin wrote: > > When dcn20_clk_src_construct() fails, we need to release clk_src. > > Fixes: 6f4e6361c3ff ("drm/amd/display: Add Renoir resource (v2)") > Signed-off-by: Miaoqian Lin > --- > drivers/gpu/drm/amd/display/dc/dcn21/dcn21_resource.c | 1 + > 1 file changed, 1 insertion(+) > > diff --git a/drivers/gpu/drm/amd/display/dc/dcn21/dcn21_resource.c b/drivers/gpu/drm/amd/display/dc/dcn21/dcn21_resource.c > index 3fe4bfbb98a0..faab59508d82 100644 > --- a/drivers/gpu/drm/amd/display/dc/dcn21/dcn21_resource.c > +++ b/drivers/gpu/drm/amd/display/dc/dcn21/dcn21_resource.c > @@ -997,6 +997,7 @@ static struct clock_source *dcn21_clock_source_create( > return &clk_src->base; > } > > + kfree(clk_src); > BREAK_TO_DEBUGGER(); > return NULL; > } > -- > 2.17.1 >