Skip to contentSkip to conversation

usb:gadget:Simplify the error checking of the function,at91sam9261_udc_init

PATCH Alexandre Belloni 2 participants 3 messages Jun 18, 2015 1 message not in the archive

lore
Share & tools
lore

A message that is not in the archive (sent off-list or not yet received): [email protected]

Alexandre Belloni

author Acked-by
#1 lore raw
Quoted 9 lines · Nicholas Krause

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.

Signature · 3 lines
Alexandre Belloni, Free Electrons
Embedded Linux, Kernel and Android engineering
http://free-electrons.com
#2 lore raw
Quoted 9 lines · Alexandre Belloni
Quoted 8 lines · Nicholas Krause

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.

Quoted 3 lines
Quoted 1 line

OK, it seems the original patch got ignored by all the mailing lists. To bad, that one was actually applicable :)

Signature · 3 lines
Alexandre Belloni, Free Electrons
Embedded Linux, Kernel and Android engineering
http://free-electrons.com
#3 lore raw
Quoted 10 lines · Alexandre Belloni
Quoted 9 lines · Alexandre Belloni
Quoted 8 lines · Nicholas Krause

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.

Quoted 6 lines
Quoted 3 lines
Quoted 1 line

OK, it seems the original patch got ignored by all the mailing lists. To bad, that one was actually applicable :)

Nick is banned from vger.kernel.org, so that is why his patches will not ever show up. I recommend that you do the same if possible.

greg k-h