Received: by 2002:a05:6358:d09b:b0:dc:cd0c:909e with SMTP id jc27csp1349451rwb; Tue, 29 Nov 2022 12:18:00 -0800 (PST) X-Google-Smtp-Source: AA0mqf64ddUtjLhX1BnGITB2QDUisxqVqA0dNC6oNGtEFEVECoQQX7N83h97M29gigW1CfoAadQo X-Received: by 2002:aa7:de05:0:b0:46b:7706:9a38 with SMTP id h5-20020aa7de05000000b0046b77069a38mr5167757edv.321.1669753080737; Tue, 29 Nov 2022 12:18:00 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1669753080; cv=none; d=google.com; s=arc-20160816; b=BoPNN8NBnbvtHL30esq2EEot+n23W1xjlCmicmRkJy4mibJDERkLEocwnHexJnEQh7 RN/06Qe3jhv7L5NkjTvPRaKkZ1fNC+Ee1fZ1RBkBf58TKvGu0KM/6H8PQA3/tx6qp87a Dkz8f8Vn+EVaw7XaF0U7Cl1CgFHl8CQCR7SHZqKudrhJpANg6JXZyszDSzK6EGvX3NZu 3i8tnRrQw63GNAZQuWCoxmDDhVlOffJB8ZZ/p4jiJdIaN7Iq+ufYmLHBrGAmU0QwcHAB yt6NfXFK9O0hLpMlnjaqGEDLfzOqO9PjgKl/UF3kIE9InjS95vYHEFWfUJqE4LUMlKR1 BIhg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:message-id:user-agent:date:to:cc:from:subject :references:in-reply-to:content-transfer-encoding:mime-version :dkim-signature; bh=dph3upGKfilqBGNmUDKpNEKohIKxkbco5kqQPpoV+SU=; b=CI/eTVO2M8E+0MXSRodaYHahvlKzXsyxF/bgQRzTSSy0IGwWndpmY5raIjJXPjufWP df0v7h+H0bHlQe+ooU5OKsVMtQVi19pAoG4K+cyqn4KmRKdOaDYEzUde2ug8YQ5pc4yy I575durpogRrjrdAIkiZfQ2cJtW1xQTfoZ4A1hvgezxNPFZpboBnvfrwnjhlKHJDQyph q+NUDY8L3E7a0TWgzYHCIIR0kVpwMdL7gLKON2zGtASMTWuvjyhpXgjk4dIhw5OJDzHC wUG1ATXrF2ECYvphuhClVeX4U9B8O54DMCFbDkGKlFNvxJdWwez5Hujkk8aG1biQevRL ondQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=qpq4mLjJ; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 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 out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id hs4-20020a1709073e8400b0078db3ce1e59si13787914ejc.38.2022.11.29.12.17.38; Tue, 29 Nov 2022 12:18:00 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=qpq4mLjJ; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 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 S236153AbiK2ULm (ORCPT + 85 others); Tue, 29 Nov 2022 15:11:42 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:51490 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S236871AbiK2ULh (ORCPT ); Tue, 29 Nov 2022 15:11:37 -0500 Received: from ams.source.kernel.org (ams.source.kernel.org [145.40.68.75]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id EB6EA5917E; Tue, 29 Nov 2022 12:11:36 -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 ams.source.kernel.org (Postfix) with ESMTPS id 938D6B818C0; Tue, 29 Nov 2022 20:11:35 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id 3A651C433C1; Tue, 29 Nov 2022 20:11:34 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1669752694; bh=dph3upGKfilqBGNmUDKpNEKohIKxkbco5kqQPpoV+SU=; h=In-Reply-To:References:Subject:From:Cc:To:Date:From; b=qpq4mLjJPieESlUEVylekdW2r+yklzQ+ZP7dGIz5UmOHHMsBK0XAai0h0gygR90kr c99uJI0dPFLRHtt4wp3Zawf+q/D3aj5aC4EY5DsiGHNDe2Ohgow8fAbbVjg8OBbdAp DOx4G+QdLTCeLRJhEZzPnpL8+rpuSvl0C1HpWoH0rwhMCcXOCdIDLXgLSOGjGyQoWK C6HH8sv7RLjIecl4cPy0qXwuVYUeJyGd1Le1bCNo7rrh6kYE5iFtBUWqNVoMDxyzlQ LSrrX7e1RPLWEOosIzhKQQvGY5A7xCXnCU6huLmykQDaPvL1ZDx0g+dI1MDnbGbZY+ pXqgs9q2Y7NwA== Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable In-Reply-To: <20221122152353.204132-1-xiujianfeng@huawei.com> References: <20221122152353.204132-1-xiujianfeng@huawei.com> Subject: Re: [PATCH] clk: visconti: Fix memory leak in visconti_register_pll() From: Stephen Boyd Cc: linux-clk@vger.kernel.org, linux-arm-kernel@lists.infradead.org, linux-kernel@vger.kernel.org To: Xiu Jianfeng , mturquette@baylibre.com, nobuhiro1.iwamatsu@toshiba.co.jp Date: Tue, 29 Nov 2022 12:11:30 -0800 User-Agent: alot/0.10 Message-Id: <20221129201134.3A651C433C1@smtp.kernel.org> X-Spam-Status: No, score=-7.1 required=5.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,RCVD_IN_DNSWL_HI, SPF_HELO_NONE,SPF_PASS autolearn=ham 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 Quoting Xiu Jianfeng (2022-11-22 07:23:53) > @pll->rate_table has allocated memory by kmemdup(), if clk_hw_register() > fails, it should be freed, otherwise it will cause memory leak issue, > this patch fixes it. >=20 > Fixes: b4cbe606dc36 ("clk: visconti: Add support common clock driver and = reset driver") > Signed-off-by: Xiu Jianfeng > --- Applied to clk-next