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 8E484C4332F for ; Wed, 23 Nov 2022 01:02:59 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S235096AbiKWBC5 (ORCPT ); Tue, 22 Nov 2022 20:02:57 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:38866 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S234891AbiKWBCs (ORCPT ); Tue, 22 Nov 2022 20:02:48 -0500 Received: from ams.source.kernel.org (ams.source.kernel.org [IPv6:2604:1380:4601:e00::1]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 9349A11471; Tue, 22 Nov 2022 17:02:43 -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 7823EB81E4E; Wed, 23 Nov 2022 01:02:42 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id 14B70C433B5; Wed, 23 Nov 2022 01:02:41 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1669165361; bh=8CrXVtbNPoRo6//6sdp2xYtaIgxcfsZN5ECNv53aqmc=; h=In-Reply-To:References:Subject:From:Cc:To:Date:From; b=gBolhn3oocOYRM4P94Bd49gBwKoBeVm6tTJX4FT2D1jecyqJ4NLYERIzwObI2zVRd 4mpOvl7h116+vWNPq2FmcxoNIBZUsWTw31dKma8Z8f6KHDcxoQPKbWVG1m9I10BW6k Ep6RiTc86Bs4eJJajwZkiQRM8xi1Cyc7ICd34+ZW1nuTHogUwcNGe2gd9vFARSThSH JxILKStnl7xPamf9k3l6XA5YjRVwXGhNjwYw8s0V8GcSPGtpADumPPRBOcQ3hcb0gj FSP63rA2bqpr6FbBu5Q6xOFgH1kH/OxYgknFZYXi39PZYSOYitAY0gZTR5kmraX/f7 0KUjFzMrDhaBw== Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable In-Reply-To: <20221113181147.1626585-2-dario.binacchi@amarulasolutions.com> References: <20221113181147.1626585-1-dario.binacchi@amarulasolutions.com> <20221113181147.1626585-2-dario.binacchi@amarulasolutions.com> Subject: Re: [PATCH v4 2/2] clk: ti: dra7-atl: don't allocate `parent_names' variable From: Stephen Boyd Cc: Amarula patchwork , michael@amarulasolutions.com, Dario Binacchi , kernel test robot , Allison Randal , Miaoqian Lin , Michael Turquette , Tero Kristo , Thomas Gleixner , Tony Lindgren , linux-clk@vger.kernel.org, linux-omap@vger.kernel.org To: Dario Binacchi , linux-kernel@vger.kernel.org Date: Tue, 22 Nov 2022 17:02:39 -0800 User-Agent: alot/0.10 Message-Id: <20221123010241.14B70C433B5@smtp.kernel.org> Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Quoting Dario Binacchi (2022-11-13 10:11:47) > The `parent_names' variable was freed also in case of kzalloc() error. > Instead of modifying the code to perform a proper memory release, I > decided to fix the bug by not allocating memory. > Since only one parent name is referenced, it is not necessary to > allocate this variable at runtime and therefore you can avoid calling > the kzalloc() function. This simplifies the code (even calls to kfree > can be removed) and improves the performance of the routine. >=20 > Signed-off-by: Dario Binacchi > Reported-by: kernel test robot >=20 > --- Applied to clk-next