diff options
Diffstat (limited to 'drivers/usb')
-rw-r--r-- | drivers/usb/gadget/udc-core.c | 8 |
1 files changed, 3 insertions, 5 deletions
diff --git a/drivers/usb/gadget/udc-core.c b/drivers/usb/gadget/udc-core.c index a50811e35bdb..26e116bd6f59 100644 --- a/drivers/usb/gadget/udc-core.c +++ b/drivers/usb/gadget/udc-core.c | |||
@@ -198,12 +198,10 @@ int usb_add_gadget_udc_release(struct device *parent, struct usb_gadget *gadget, | |||
198 | gadget->dev.dma_parms = parent->dma_parms; | 198 | gadget->dev.dma_parms = parent->dma_parms; |
199 | gadget->dev.dma_mask = parent->dma_mask; | 199 | gadget->dev.dma_mask = parent->dma_mask; |
200 | 200 | ||
201 | if (release) { | 201 | if (release) |
202 | gadget->dev.release = release; | 202 | gadget->dev.release = release; |
203 | } else { | 203 | else |
204 | if (!gadget->dev.release) | 204 | gadget->dev.release = usb_udc_nop_release; |
205 | gadget->dev.release = usb_udc_nop_release; | ||
206 | } | ||
207 | 205 | ||
208 | ret = device_register(&gadget->dev); | 206 | ret = device_register(&gadget->dev); |
209 | if (ret) | 207 | if (ret) |