From: SF Markus Elfring Date: Mon, 12 Dec 2016 17:15:45 +0000 Subject: Re: [media] bt8xx: One function call less in bttv_input_init() after error detection Message-Id: List-Id: References: <5560ffc2-e17d-5750-24e5-3150aba5d8aa@grinta.net> <581046dd-0a4a-acea-a6a8-8d2469594881@grinta.net> In-Reply-To: <581046dd-0a4a-acea-a6a8-8d2469594881@grinta.net> MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit To: Daniele Nicolodi Cc: linux-media@vger.kernel.org, Alexey Khoroshilov , Hans Verkuil , Mauro Carvalho Chehab , LKML , kernel-janitors@vger.kernel.org >> I suggest to check return values immediately after each function call. >> An error situation can be detected earlier then and only the required >> clean-up functionality will be executed at the end. > > Which improvement does this bring? * How do you think about to avoid requesting additional system resources when it was determined that a previously required memory allocation failed? * Can the corresponding exception handling become a bit more efficient? > Why? Do you care for any results from static source code analysis? Regards, Markus