Re: [PATCH] usb:gadget:Simplify the error checking of the function,at91sam9261_udc_init

From: Alexandre Belloni
Date: Thu Jun 18 2015 - 12:41:38 EST


On 03/05/2015 at 23:25:02 -0400, Nicholas Krause wrote :
> This simplifies the error checking of the function,at91sam9261_udc_init
> by using PTR_ERR_OR_ZERO in the return statement rather then a unnessary
> if statement to check the return value of a call to the function,
> syscon_regmap_lookup_by_phandle by checking with a call to the function,
> IS_ERR and returning a error pointer if there is one for the function,
> at91sam9261_udc_init. Furthermore this was found by running coccinelle
> against the lastest kernel tree.
>
> Signed-off-by: Nicholas Krause <xerofoify@xxxxxxxxx>
Acked-by: Alexandre Belloni <alexandre.belloni@xxxxxxxxxxxxxxxxxx>

--
Alexandre Belloni, Free Electrons
Embedded Linux, Kernel and Android engineering
http://free-electrons.com
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/