Re: [PATCH] regulator: da9053: regulators is an array, so no need to check if NULL
From: Mark Brown
Date: Tue Mar 29 2016 - 13:01:47 EST
On Mon, Mar 28, 2016 at 04:41:43PM +0100, Colin King wrote:
> From: Colin Ian King <colin.king@xxxxxxxxxxxxx>
>
> pdata->regulators is an array, so can never be null, so the
> null check on this array is redundant and can be removed.
What is the value in this change? The check is always true so it will
be optimised away if the compiler is sensible but leaving it there means
that there's one less thing that can go wrong if the platform data is
changed.
Attachment:
signature.asc
Description: PGP signature