[PATCH v3 4/4] spl: fit: improve spl_nand_fit_read(...) readability

Simon Glass sjg at chromium.org
Sun May 31 16:08:32 CEST 2020


Hi Dario,

On Wed, 27 May 2020 at 05:56, Dario Binacchi <dariobin at libero.it> wrote:
>
> Replacing the ret variable with err and handling first the error
> condition about the value returned by the spl_nand_fit_read routine,
> improves the code readability.
> Furthermore, the 'else' int the 'else return ret' instruction was
> useless.
>
> cc: Michael Trimarchi <michael at amarulasolutions.com>
> Signed-off-by: Dario Binacchi <dariobin at libero.it>
> ---
>
> Changes in v3: None
> Changes in v2: None
>
>  common/spl/spl_nand.c | 10 +++++-----
>  1 file changed, 5 insertions(+), 5 deletions(-)

I think 'ret' is better than 'err' since we don't know if it is an
error until we check it, but we do know it is a return code.

Regards,
Simon


More information about the U-Boot mailing list