From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mout.web.de ([217.72.192.78]:56793 "EHLO mout.web.de" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752293AbcIPFdA (ORCPT ); Fri, 16 Sep 2016 01:33:00 -0400 Subject: Re: clk/Renesas-MSTP: Less function calls in cpg_mstp_clocks_init() after error detection To: Geert Uytterhoeven References: <566ABCD9.1060404@users.sourceforge.net> <1575ddf1-bd1a-fe98-046a-a586eb30fe47@users.sourceforge.net> <50646b53-663f-f77f-a79e-2422b5687688@users.sourceforge.net> Cc: linux-clk , Geert Uytterhoeven , Laurent Pinchart , Michael Turquette , Simon Horman , Stephen Boyd , Ulf Hansson , LKML , "kernel-janitors@vger.kernel.org" , Julia Lawall From: SF Markus Elfring Message-ID: <4a7d20c9-d080-80a4-6529-bc9fa1b7a186@users.sourceforge.net> Date: Fri, 16 Sep 2016 07:32:33 +0200 MIME-Version: 1.0 In-Reply-To: Content-Type: text/plain; charset=windows-1252 Sender: linux-clk-owner@vger.kernel.org List-ID: >> * Should it usually be determined quicker if a required resource like >> memory could be acquired before trying the next allocation? > > Note that if memory allocation fails in this driver, the system won't > boot at all. Thanks for this information. > So even not checking for allocation failures at all could be acceptable. I find this opinion interesting somehow. I would generally prefer to check return values from various function calls immediately instead of keeping the discussed source code structure unchanged. Regards, Markus