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 vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id DAE50C4708D for ; Thu, 8 Dec 2022 02:27:01 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S229554AbiLHC1B (ORCPT ); Wed, 7 Dec 2022 21:27:01 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:51846 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229479AbiLHC0z (ORCPT ); Wed, 7 Dec 2022 21:26:55 -0500 Received: from dfw.source.kernel.org (dfw.source.kernel.org [139.178.84.217]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 148158E599; Wed, 7 Dec 2022 18:26:54 -0800 (PST) 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 dfw.source.kernel.org (Postfix) with ESMTPS id 95A5461D22; Thu, 8 Dec 2022 02:26:53 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id E436DC433D6; Thu, 8 Dec 2022 02:26:52 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1670466413; bh=EEXv31EHijcWe+oAPW/O/oSGFu1i6dgrthd8lpIk1JE=; h=In-Reply-To:References:Subject:From:Cc:To:Date:From; b=QFRj0NUJc2P+g/jO+Akg9dD4y0vBw9PBp0aq/ExBHu2lvdDF3AKdeZnsMsxvP9V33 iVXkDdFaXObf7ow9tCK11q8FiBY1SIiTpnWf0Vq1UfcsM1NTJyrGZlMmHuU7P6f8uZ mmFulhQ+1JmrU9q4yfE6FNyvpbgivu7DIoxzHfnLFux+SlauCZUyelJYD6q8QnheMh iy8nY6xV1Er2EhVpw2CezbfFLBNGT9nG8hBrqApl8HMdvdqbnfHZtbe6vkfKQccWLz SW3ITzzEvA2KmobEM4NC5Nfz+jz8pAb4ea9ymRUWD2vAkSkOYnbrChpy3M34vDc21S xmhqGvv+3/7Eg== Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable In-Reply-To: <20221123032015.63980-1-xiujianfeng@huawei.com> References: <20221123032015.63980-1-xiujianfeng@huawei.com> Subject: Re: [PATCH] clk: samsung: Fix memory leak in _samsung_clk_register_pll() From: Stephen Boyd Cc: linux-samsung-soc@vger.kernel.org, linux-clk@vger.kernel.org, linux-kernel@vger.kernel.org To: Xiu Jianfeng , alim.akhtar@samsung.com, cw00.choi@samsung.com, dianders@chromium.org, krzysztof.kozlowski@linaro.org, mturquette@baylibre.com, mturquette@linaro.org, s.nawrocki@samsung.com, tomasz.figa@gmail.com, yadi.brar@samsung.com Date: Wed, 07 Dec 2022 18:26:50 -0800 User-Agent: alot/0.10 Message-Id: <20221208022652.E436DC433D6@smtp.kernel.org> Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Quoting Xiu Jianfeng (2022-11-22 19:20:15) > If clk_register() fails, @pll->rate_table may have allocated memory by > kmemdup(), so it needs to be freed, otherwise will cause memory leak > issue, this patch fixes it. >=20 > Fixes: 3ff6e0d8d64d ("clk: samsung: Add support to register rate_table fo= r samsung plls") > Signed-off-by: Xiu Jianfeng > --- Applied to clk-next