Sam Protsenko 8038f6d288 usb: gadget: composite: Correct recovery path for register
In case when usb_composite_register() failed once (for whatever reason),
it will fail further even if all conditions are correct. Example:

    => fastboot 2
    Invalid Controller Index
    couldn't find an available UDC
    g_dnl_register: failed!, error: -19
    exit not allowed from main input shell.

    => fastboot 0
    g_dnl_register: failed!, error: -22
    exit not allowed from main input shell.

Despite that 0 is correct index for USB controller, "fastboot 0" command
will fail, because "composite" structure wasn't cleared properly on
previous fail (on "fastboot 2" command).

This patch fixes that erroneous behavior, allowing us to use composite
even after previous failure.

Signed-off-by: Sam Protsenko <semen.protsenko@linaro.org>
2016-03-01 14:47:26 +01:00
..
2015-07-22 08:57:54 +02:00
2016-02-06 12:00:59 +01:00
2014-09-24 18:30:29 -04:00
2016-02-06 12:00:59 +01:00
2016-02-06 12:00:59 +01:00
2011-02-19 20:32:37 +01:00
2016-01-19 08:31:21 -05:00
2016-01-19 08:31:21 -05:00
2016-02-06 12:00:59 +01:00