usb: gadget: composite: Fix corruption when changing configuration

Remove the config from the configs list before releasing the spinlock.
Otherwise the other cpu might be processing a SET_CONFIGURATION that
will switch to the configuration that is being released.

Change-Id: Id4da0d0e18ead63e20cb236cd1d3e8e6d116acce
Signed-off-by: Benoit Goby <benoit@android.com>
(cherry picked from commit be69452a5d1599b9522d4d7e4cdfb35995b23502)

Signed-off-by: Simon Horman <horms+renesas@verge.net.au>
1 file changed