Received: by 2002:a05:6a10:eb17:0:0:0:0 with SMTP id hx23csp1013544pxb; Thu, 9 Sep 2021 18:01:01 -0700 (PDT) X-Google-Smtp-Source: ABdhPJwAKfYrugwAYvvWRDNwwzydoD0MSTYTlwnGjnGS6U7v8BeklOEUhw2fuI+h3pIUvZqvk1Kd X-Received: by 2002:a5d:9bd3:: with SMTP id d19mr4970047ion.202.1631235661050; Thu, 09 Sep 2021 18:01:01 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1631235661; cv=none; d=google.com; s=arc-20160816; b=JhndS4jzN+ikrPEfNjavAgmmmD7qtsh3WQuR17t2HWGxDJBX78NWYPrFlfE3+GwyzL qmCTL4q/Xi+UVZ7e0KDHcG3X7nzMGXRsF44g+oppazYHoP4QJQUl5FfhMIUfhttp27y6 +w1zRgvSsEY4aNb3WKI7RdbC7T+oBBs9DqQPqvdn1jK6tsy64n3ctaOqQx53Qr4owJzE fwkTtmDFLTzpKsrEWPJJnIMvMKjFGklHiXYoMFEKh+xt0yttShARQZapNliAGNBqufO5 KgAzS1dgfUX8L4IFCzqYuBkK6eL3HALpaXx4fHgAXwkHP4dTsmyiIZL46y+SWZ6dFKZm ShXg== 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 :references:in-reply-to:message-id:date:subject:cc:to:from :dkim-signature; bh=9YmjC88oBxpCfBzc8dZlerKeFJfJDwqL+eeTf/Sk1Pg=; b=MzdXItsqcrrE+4QratUh/vHVpsljT+5QdTFuqn4IzNIfQHOp2KTcC0rCHknUfGSfAi k2xgyQrxr2gvdg8QJriVRLGG+BaKtATHlVZKAc6fEW5Dy5rnXwq4373cDF6jK1Y+aLNp HxaMiY+VaSDfn7xB6Q3GsHTPW6EOxLCp1HgwFtkOGu+n4YiN9gKsvNLER7ydJ90zZA0g W3S9VnoPdwmAqXzI0xeLT+lKlvMBvqOBwG4toSkGRgjkurNXKVpzZ/HGH6AYGgbpXB/P U2swONSSiB9Wv9mzN8Wc9LPxiNf+BaRkI0ZqI0tQMMD7wLifiUbzKh+XoKUsbqoeGGtO BOxg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=jWXIGWoU; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id b16si3025278ila.182.2021.09.09.18.00.48; Thu, 09 Sep 2021 18:01:01 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=jWXIGWoU; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S235433AbhIJBBE (ORCPT + 99 others); Thu, 9 Sep 2021 21:01:04 -0400 Received: from mail.kernel.org ([198.145.29.99]:49002 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S234520AbhIJAXf (ORCPT ); Thu, 9 Sep 2021 20:23:35 -0400 Received: by mail.kernel.org (Postfix) with ESMTPSA id 23BC2611BF; Fri, 10 Sep 2021 00:22:24 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1631233344; bh=GqVvT05583abG+0Qx/af1oRJAEOMJ06DGhSO6ySIx4g=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=jWXIGWoUp9+GVmgqirkqtoezW+15ZBdOPwtqlbfIQWi31J45Saifa5elP5l1H/bim wFtTHO0RAYdCPJNxm+rgyReWM+II1AxE9ca0w4J65B6mU6YMFTY/pC5UH4hrahPBpZ ERov0QbVGc11LH75RleAc0hX+ueWaT54VSvod/n6l2KbdQlZD0/pMVw6JzUD6dp3Bz fsmGGKxSyJsiGxaEJvpkfdlo5WIg8QYLeIJ7dfUoN+tck6dbV7Xw3OsSX0HpCS5orw er0rPy2QCSopDLIt+vH0EahTQpJoZ5k6ALKPzgGAM3L34zW9Z4P3Bcm084k8ECJiw8 o0moweVKtCLvw== From: Sasha Levin To: linux-kernel@vger.kernel.org, stable@vger.kernel.org Cc: Shubhrajyoti Datta , Stephen Boyd , Sasha Levin , linux-clk@vger.kernel.org, linux-arm-kernel@lists.infradead.org Subject: [PATCH AUTOSEL 5.4 31/37] clk: zynqmp: Fix a memory leak Date: Thu, 9 Sep 2021 20:21:36 -0400 Message-Id: <20210910002143.175731-31-sashal@kernel.org> X-Mailer: git-send-email 2.30.2 In-Reply-To: <20210910002143.175731-1-sashal@kernel.org> References: <20210910002143.175731-1-sashal@kernel.org> MIME-Version: 1.0 X-stable: review X-Patchwork-Hint: Ignore Content-Transfer-Encoding: 8bit Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org From: Shubhrajyoti Datta [ Upstream commit e7296d16ef7be11a6001be9bd89906ef55ab2405 ] Fix a memory leak of mux. Signed-off-by: Shubhrajyoti Datta Link: https://lore.kernel.org/r/20210818065929.12835-3-shubhrajyoti.datta@xilinx.com Signed-off-by: Stephen Boyd Signed-off-by: Sasha Levin --- drivers/clk/zynqmp/clk-mux-zynqmp.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/clk/zynqmp/clk-mux-zynqmp.c b/drivers/clk/zynqmp/clk-mux-zynqmp.c index 0af8f74c5fa5..d6a00e4074e2 100644 --- a/drivers/clk/zynqmp/clk-mux-zynqmp.c +++ b/drivers/clk/zynqmp/clk-mux-zynqmp.c @@ -132,7 +132,7 @@ struct clk_hw *zynqmp_clk_register_mux(const char *name, u32 clk_id, hw = &mux->hw; ret = clk_hw_register(NULL, hw); if (ret) { - kfree(hw); + kfree(mux); hw = ERR_PTR(ret); } -- 2.30.2