Received: by 2002:a6b:500f:0:0:0:0:0 with SMTP id e15csp4612153iob; Sun, 8 May 2022 19:11:58 -0700 (PDT) X-Google-Smtp-Source: ABdhPJwupebM5zLYgkXTri94Lhhi3naaWmJA49WPq7JpqYGEQfr2pOC2lyntzb5h1we/zhBo7Fuw X-Received: by 2002:a17:903:31d1:b0:159:804:e852 with SMTP id v17-20020a17090331d100b001590804e852mr14313983ple.19.1652062318227; Sun, 08 May 2022 19:11:58 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1652062318; cv=none; d=google.com; s=arc-20160816; b=kcy99xPNZWXzZg8gCSAh1RIrZbv/OE08Vcrf5SMrdhOxBJ882qKgyZnkckCm2vMfjE nuDWYOCMmPm4+D+EH5cE/kF2z5UFFZSJaO0ZtAN/PJstmti2TNP8fhirVHY7b/UM3quu Z+iqyAD/dUayp17chyZVnxrGUFHDRejU4bZx4Qjkv+F2DDDT4rWfHGnPPbw4iD35Lp3D mGu+BTagjLkw5JIgBz4NsbA9u2o2/rTtw0+BjlAo2msuHvUdJ2izn0PIZJuQmL9HJWhN UIhBadRxveOyoukUJtQTm6gS0JSW9fuTZYe/QMWP4VaQOczR5hz65jm+3pss3saLKMFV mhog== 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 :user-agent:references:in-reply-to:message-id:date:subject:cc:to :from:dkim-signature; bh=ynWT6C/4f9XqH55zP3Yi0HIVoFz8WJUBWkWbGLgBxgE=; b=tDH2mU9kNL0irnZaMZMLPRBQws96jBbqDazfxdrTAtfjNM3k17eEXDpO9sgOVgUM6I NUjlls0B4j1IUBSt93Xl21L2CdkWcHm9i74ztW+v9yut7k90inEBla5qS55ZDbj0N8CY KxwtCPsSXt9oAcKHMG7VCxFMzNQTRYGY1FU1Ftnt7KqNY2xqoLwWpHG1+oaNVI8yNRp/ qjAVPS6MpPink0Dj+oAy8UWC1cnhOVcORZO1XITDjl1jKoE/ppbnsmxBRlW4Stxt8d/q nFrE/wxm+1+CyRwy8qftuAt89HIj+wX1adMMeU3LmHdJehGN7TedwrNfHlHf9bH0+NOy g7DA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linuxfoundation.org header.s=korg header.b=J38fCjNN; spf=softfail (google.com: domain of transitioning linux-kernel-owner@vger.kernel.org does not designate 23.128.96.19 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linuxfoundation.org Return-Path: Received: from lindbergh.monkeyblade.net (lindbergh.monkeyblade.net. [23.128.96.19]) by mx.google.com with ESMTPS id bk11-20020a056a02028b00b003aa7f30fcaasi14472337pgb.516.2022.05.08.19.11.57 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sun, 08 May 2022 19:11:58 -0700 (PDT) Received-SPF: softfail (google.com: domain of transitioning linux-kernel-owner@vger.kernel.org does not designate 23.128.96.19 as permitted sender) client-ip=23.128.96.19; Authentication-Results: mx.google.com; dkim=pass header.i=@linuxfoundation.org header.s=korg header.b=J38fCjNN; spf=softfail (google.com: domain of transitioning linux-kernel-owner@vger.kernel.org does not designate 23.128.96.19 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linuxfoundation.org Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by lindbergh.monkeyblade.net (Postfix) with ESMTP id E01593B560; Sun, 8 May 2022 19:11:04 -0700 (PDT) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1376543AbiEDRpL (ORCPT + 99 others); Wed, 4 May 2022 13:45:11 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:55362 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1355540AbiEDRHu (ORCPT ); Wed, 4 May 2022 13:07:50 -0400 Received: from ams.source.kernel.org (ams.source.kernel.org [145.40.68.75]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id D2B57517DA; Wed, 4 May 2022 09:54:28 -0700 (PDT) Received: from smtp.kernel.org (relay.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by ams.source.kernel.org (Postfix) with ESMTPS id 14862B8278E; Wed, 4 May 2022 16:54:27 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id B73EDC385A4; Wed, 4 May 2022 16:54:25 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linuxfoundation.org; s=korg; t=1651683265; bh=IIINfVmwi4MVCKx9RAdZyLjQxxX/j2tucRd/eLdKJW4=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=J38fCjNNJnX8J42CYOzI+y5sg5vlXH517meZmAbQLjHsvn4u+AdZVjiZrOdLjH5Xg 4C+B2uqWGzb5DdLqcxuw5DyzF4KR1K3N0NBpqdbXOKfGX4EsphQ3gfACfE+Hfg86c/ q9ykF0D7h/zryDipD3yOtoyTY2HHiAlXQLnBEe/g= From: Greg Kroah-Hartman To: linux-kernel@vger.kernel.org Cc: Greg Kroah-Hartman , stable@vger.kernel.org, Miaoqian Lin , Alex Deucher , Sasha Levin Subject: [PATCH 5.15 115/177] drm/amd/display: Fix memory leak in dcn21_clock_source_create Date: Wed, 4 May 2022 18:45:08 +0200 Message-Id: <20220504153103.497293099@linuxfoundation.org> X-Mailer: git-send-email 2.36.0 In-Reply-To: <20220504153053.873100034@linuxfoundation.org> References: <20220504153053.873100034@linuxfoundation.org> User-Agent: quilt/0.66 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-Spam-Status: No, score=-2.6 required=5.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,HEADER_FROM_DIFFERENT_DOMAINS, MAILING_LIST_MULTI,RDNS_NONE,SPF_HELO_NONE,T_SCC_BODY_TEXT_LINE 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 From: Miaoqian Lin [ Upstream commit 65e54987508b6f0771f56bdfa3ee1926d52785ae ] 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 Signed-off-by: Alex Deucher Signed-off-by: Sasha Levin --- 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 fbbdf9976183..5b8274b8c384 100644 --- a/drivers/gpu/drm/amd/display/dc/dcn21/dcn21_resource.c +++ b/drivers/gpu/drm/amd/display/dc/dcn21/dcn21_resource.c @@ -1428,6 +1428,7 @@ static struct clock_source *dcn21_clock_source_create( return &clk_src->base; } + kfree(clk_src); BREAK_TO_DEBUGGER(); return NULL; } -- 2.35.1