From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from bombadil.infradead.org (bombadil.infradead.org [198.137.202.133]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.lore.kernel.org (Postfix) with ESMTPS id DC07EE8FDC7 for ; Thu, 5 Oct 2023 10:20:35 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20210309; h=Sender: Content-Transfer-Encoding:Content-Type:List-Subscribe:List-Help:List-Post: List-Archive:List-Unsubscribe:List-Id:In-Reply-To:MIME-Version:References: Message-ID:Subject:Cc:To:From:Date:Reply-To:Content-ID:Content-Description: Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID: List-Owner; bh=kHG6uGUx/eGE5FJ8kSawpxp4ykeczpvyN1JzMSms1UU=; b=bveiwmZ62QiOT0 y4/E3q0Nbn88uScq3T109QkZd7S29Z2WHyVJWfzAknLMyPkXOufvOHrLtIjdi3CnYQwK0MxWIe2Pu 6XjcgTTUfwzPyV3Kb4U9V+j0BKUUd5dBTxJe0BJ60NxrbYfhB4BblJ19Vc8I3J7aS4l/0+pfBrtQc nN2dA5s4ScNGEUL3MvHHitZbvK6O7MzWwehTChA5wFUv/2R/hoW9Fn+uI3K37JpdDk0G0bihVRP0M een28lswY3ZFh7IeLQ4Fp8GOXKmYeX0GlERZVhK1LTep3qCJZoJb6hepq+6wROfiX7mucvU1yS4oD EXftxIyUwBY5VlA0YQtA==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.96 #2 (Red Hat Linux)) id 1qoLSh-001sl1-2j; Thu, 05 Oct 2023 10:20:07 +0000 Received: from foss.arm.com ([217.140.110.172]) by bombadil.infradead.org with esmtp (Exim 4.96 #2 (Red Hat Linux)) id 1qoLSe-001skc-1c for linux-arm-kernel@lists.infradead.org; Thu, 05 Oct 2023 10:20:06 +0000 Received: from usa-sjc-imap-foss1.foss.arm.com (unknown [10.121.207.14]) by usa-sjc-mx-foss1.foss.arm.com (Postfix) with ESMTP id 3AEFE152B; Thu, 5 Oct 2023 03:20:39 -0700 (PDT) Received: from pluto (unknown [172.31.20.19]) by usa-sjc-imap-foss1.foss.arm.com (Postfix) with ESMTPSA id CF0813F5A1; Thu, 5 Oct 2023 03:19:59 -0700 (PDT) Date: Thu, 5 Oct 2023 11:19:57 +0100 From: Cristian Marussi To: Sudeep Holla Cc: linux-arm-kernel@lists.infradead.org, Michael Turquette , Stephen Boyd , linux-clk@vger.kernel.org Subject: Re: [PATCH] clk: scmi: Free scmi_clk allocated when the clocks with invalid info are skipped Message-ID: References: <20231004193600.66232-1-sudeep.holla@arm.com> MIME-Version: 1.0 Content-Disposition: inline In-Reply-To: <20231004193600.66232-1-sudeep.holla@arm.com> X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20231005_032004_591908_1664E394 X-CRM114-Status: GOOD ( 14.80 ) X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.org On Wed, Oct 04, 2023 at 08:36:00PM +0100, Sudeep Holla wrote: > Add the missing devm_kfree() when we skip the clocks with invalid or > missing information from the firmware. > Hi, LGTM. Reviewed-by: Cristian Marussi Thanks, Cristian > Cc: Cristian Marussi > Cc: Michael Turquette > Cc: Stephen Boyd > Cc: linux-clk@vger.kernel.org > Fixes: 6d6a1d82eaef ("clk: add support for clocks provided by SCMI") > Signed-off-by: Sudeep Holla > --- > drivers/clk/clk-scmi.c | 1 + > 1 file changed, 1 insertion(+) > > diff --git a/drivers/clk/clk-scmi.c b/drivers/clk/clk-scmi.c > index 2e1337b511eb..3f525bed9794 100644 > --- a/drivers/clk/clk-scmi.c > +++ b/drivers/clk/clk-scmi.c > @@ -232,6 +232,7 @@ static int scmi_clocks_probe(struct scmi_device *sdev) > sclk->info = scmi_proto_clk_ops->info_get(ph, idx); > if (!sclk->info) { > dev_dbg(dev, "invalid clock info for idx %d\n", idx); > + devm_kfree(dev, sclk); > continue; > } > > -- > 2.42.0 > _______________________________________________ linux-arm-kernel mailing list linux-arm-kernel@lists.infradead.org http://lists.infradead.org/mailman/listinfo/linux-arm-kernel