From patchwork Sat Sep 23 13:31:27 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: =?utf-8?q?J=2E_Neusch=C3=A4fer?= X-Patchwork-Id: 13396745 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 vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id 24B3CCE7A88 for ; Sat, 23 Sep 2023 13:31:42 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S229616AbjIWNbq (ORCPT ); Sat, 23 Sep 2023 09:31:46 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:47360 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229476AbjIWNbq (ORCPT ); Sat, 23 Sep 2023 09:31:46 -0400 Received: from mout.gmx.net (mout.gmx.net [212.227.15.19]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 3741019C; Sat, 23 Sep 2023 06:31:38 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=gmx.net; s=s31663417; t=1695475890; x=1696080690; i=j.neuschaefer@gmx.net; bh=3aoYsFvHdLQ1zTsKyLP0oEuWvOgGBDuRqueX4hDnnJE=; h=X-UI-Sender-Class:From:To:Cc:Subject:Date; b=CIA+S3FR+thMZ7uH+pgX/pEw5WBsU34+4I+QtbASDckhCHPBr1qUqsQGZ6SdXmyyNFhOWYF794y XvSA3rT0EiKl0niyMD+BytOQt9bJYDbByGF9wb/PwAFP4rD20NHq91dJ02hpLtNC5SLtNK2xJS+ok WIjCGI9lCOg0G9iHdfTaio3NdhuTUlD4LVrDLKf04EFj+j30lpHUqSfNSDCo0HqU1qH8F+Q5sFmql 24ueQdk2hW8wvmwFWzbExbBZ2ccMI0NvmyuxrAykSMexV5oENlP3AhMDpTmOoXb8mIzGjw4iCKXXe rXoemMreUq7kRTOYk//ko1IaKYJvkeTNrt1w== X-UI-Sender-Class: 724b4f7f-cbec-4199-ad4e-598c01a50d3a Received: from probook ([89.0.47.152]) by mail.gmx.net (mrgmx004 [212.227.17.190]) with ESMTPSA (Nemesis) id 1MuUj2-1ra5Lv40zS-00rVKM; Sat, 23 Sep 2023 15:31:30 +0200 From: =?utf-8?q?Jonathan_Neusch=C3=A4fer?= To: linux-clk@vger.kernel.org Cc: =?utf-8?q?Jonathan_Neusch=C3=A4fer?= , Avi Fishman , Tomer Maimon , Tali Perry , Patrick Venture , Nancy Yuen , Benjamin Fair , Michael Turquette , Stephen Boyd , openbmc@lists.ozlabs.org, linux-kernel@vger.kernel.org Subject: [PATCH] clk: npcm7xx: Fix incorrect kfree Date: Sat, 23 Sep 2023 15:31:27 +0200 Message-Id: <20230923133127.1815621-1-j.neuschaefer@gmx.net> X-Mailer: git-send-email 2.40.1 MIME-Version: 1.0 X-Provags-ID: V03:K1:MzXEya1jWvyFn/iWbjLkP5u7vhVmzdkIDybc1OE3k9SmipH+0Sc B+2k77sBUvNBti61dTU9cnvAhlknCVcwf/ax8fVb9gp2TD9o3V1t4r0Z81vxk2h6QOSIFhg EDPuuxp+UvRfydLNtXIGveCAZTVRCoZWywDsdLjLteaHDsVjQdU/4qznli2Ti8ap/5FxfUo 5Fd1tckxUgzZLNFjP17Jw== UI-OutboundReport: notjunk:1;M01:P0:zS98FUfADP8=;roxmjkJ5q3Zw6CKrMQ9ERd4TwhY GAFK3mF0uukB7e1ZsfiwObPW+ZaZAsYxIkmOIRFewdrUQsZspz/8QFWfZhXnNYpazItnyQz9C xajb+sm/R6JYLy9w6AlDmzupFayK+cDLnApAeOCxqpcNoXE5KOkm3Q/2AuEuJn/3FC3kgKvfS H+eNKrFU03zomPo6YcALUIed6QWFmEQ/D5E6s+KERYYqK9CV4PZrPxTgcys+M5DClQxSSvb9m AYNhWSxteNc4a/TMAcR4f48OHuP9YLaGhMIIxM8VPqgzpTP+5moF2V+TOmuLY06UT+d4Z/4Fd xJw5q6wK1XdaeaMLLpFy+NQ4cwT6gcRZbD59LYF2sxWqxuw4i/gih19X1tU2r0DTeeE0Rnn6B fGbUNfxeb3kEN74fThNfGr1svOyqqV7m0d9sF/XLTJoslztiaiCIa9CgyZoXEXd5GK90sGKFU MkXPdUmTE7xyad5oUG65bPV5IKLIJzaGdmAkDXXzPMH7hkEIVDMXBkv4oE6Xd9HAzfOAkwKE7 atxbPEm+HD3+YyTpE5/LrVePP6oe2lBwhjRj0/RPb/PICwzcYaVD9Ds9je6IrCane8pdJd00d hnBgxg4IgQl51Bkn17t0lJqJiRblATYWfBpQUQnGyEmad17UKd2u4jVZ3ql89FhQZoHkJia+3 ulP+UCGLGQLaSCShYWevtujTQf5mpa3JB6k2M5HRZfhPwyZ1YiqsLcSVAlGjbiZJdDb6Ijw1C kjcthnZXNqieZbnZcbKPsq5fyGhmiQ73TVMpCIoekBFSWwy47n47HPIA0p9A8rPMm2gxQeFnH eslkQGRkt0+bdsOU/RyRWgkg7NMP5tWmzInQbgqFdQ5HOU+pUhVvwnzM+28SKbZWkNJPCJRIF mhYc2fVZkUa1KgMo9x7pIV0fstemB0z6rc7rVIrarg5zxbHc/rrTfwvMCE6v0lAty//xUuOIE iyx/MNF0WSzZsZzd56ll8Yecj+4= Precedence: bulk List-ID: X-Mailing-List: linux-clk@vger.kernel.org The corresponding allocation is: > npcm7xx_clk_data = kzalloc(struct_size(npcm7xx_clk_data, hws, > NPCM7XX_NUM_CLOCKS), GFP_KERNEL); ... so, kfree should be applied to npcm7xx_clk_data, not npcm7xx_clk_data->hws. Signed-off-by: Jonathan Neuschäfer --- drivers/clk/clk-npcm7xx.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) -- 2.40.1 diff --git a/drivers/clk/clk-npcm7xx.c b/drivers/clk/clk-npcm7xx.c index e319cfa51a8a3..030186def9c69 100644 --- a/drivers/clk/clk-npcm7xx.c +++ b/drivers/clk/clk-npcm7xx.c @@ -510,7 +510,7 @@ static void __init npcm7xx_clk_init(struct device_node *clk_np) return; npcm7xx_init_fail: - kfree(npcm7xx_clk_data->hws); + kfree(npcm7xx_clk_data); npcm7xx_init_np_err: iounmap(clk_base); npcm7xx_init_error: