usb: dwc3: core: memory ordering fix in close

As a bitmap is used for free/used. As a device freed
all memory operations must be scheduled before the bitmap
is manipulated.

Change-Id: I1e3d6e499dac8c68817232017422aefe633bdb9f
Signed-off-by: Oliver Neukum <oneukum@suse.de>
Signed-off-by: Felipe Balbi <balbi@ti.com>
Signed-off-by: Pavankumar Kondeti <pkondeti@codeaurora.org>
diff --git a/drivers/usb/dwc3/core.c b/drivers/usb/dwc3/core.c
index 64a0e01..70469a9 100644
--- a/drivers/usb/dwc3/core.c
+++ b/drivers/usb/dwc3/core.c
@@ -99,6 +99,7 @@
 
 	ret = test_bit(id, dwc3_devs);
 	WARN(!ret, "dwc3: ID %d not in use\n", id);
+	smp_mb__before_clear_bit();
 	clear_bit(id, dwc3_devs);
 }
 EXPORT_SYMBOL_GPL(dwc3_put_device_id);