Oliver Neukum wrote:
Am Donnerstag, 4. August 2011, 21:33:31 schrieb Sebastian Andrzej Siewior:
use status variable instead of explicit gotos to distinguish between a
repsonse and stall condition.
Why? Where's the improvement? You have even reduced the information
content to the reader. "goto stall" is very clear. "status = -EOPNOTSUPP" is
meaningless.
How so? composite_setup() and other gadgets return a this (a negative
error code) to let udc driver know to reply with a stall. The stall label
itself returned earlier the same error code for the same purpose. The goto
statements are nice for clean-ups and so on but this criss-cross jumps can
be handler in a nicer way.
Regards
Oliver
Sebastian
--
To unsubscribe from this list: send the line "unsubscribe linux-usb" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html