diff options
Diffstat (limited to 'drivers/usb/gadget/s3c-hsotg.c')
-rw-r--r-- | drivers/usb/gadget/s3c-hsotg.c | 8 |
1 files changed, 6 insertions, 2 deletions
diff --git a/drivers/usb/gadget/s3c-hsotg.c b/drivers/usb/gadget/s3c-hsotg.c index f742c8e7397..1f73b485732 100644 --- a/drivers/usb/gadget/s3c-hsotg.c +++ b/drivers/usb/gadget/s3c-hsotg.c | |||
@@ -22,6 +22,7 @@ | |||
22 | #include <linux/seq_file.h> | 22 | #include <linux/seq_file.h> |
23 | #include <linux/delay.h> | 23 | #include <linux/delay.h> |
24 | #include <linux/io.h> | 24 | #include <linux/io.h> |
25 | #include <linux/slab.h> | ||
25 | 26 | ||
26 | #include <linux/usb/ch9.h> | 27 | #include <linux/usb/ch9.h> |
27 | #include <linux/usb/gadget.h> | 28 | #include <linux/usb/gadget.h> |
@@ -2144,6 +2145,7 @@ static int s3c_hsotg_ep_enable(struct usb_ep *ep, | |||
2144 | u32 epctrl; | 2145 | u32 epctrl; |
2145 | u32 mps; | 2146 | u32 mps; |
2146 | int dir_in; | 2147 | int dir_in; |
2148 | int ret = 0; | ||
2147 | 2149 | ||
2148 | dev_dbg(hsotg->dev, | 2150 | dev_dbg(hsotg->dev, |
2149 | "%s: ep %s: a 0x%02x, attr 0x%02x, mps 0x%04x, intr %d\n", | 2151 | "%s: ep %s: a 0x%02x, attr 0x%02x, mps 0x%04x, intr %d\n", |
@@ -2195,7 +2197,8 @@ static int s3c_hsotg_ep_enable(struct usb_ep *ep, | |||
2195 | switch (desc->bmAttributes & USB_ENDPOINT_XFERTYPE_MASK) { | 2197 | switch (desc->bmAttributes & USB_ENDPOINT_XFERTYPE_MASK) { |
2196 | case USB_ENDPOINT_XFER_ISOC: | 2198 | case USB_ENDPOINT_XFER_ISOC: |
2197 | dev_err(hsotg->dev, "no current ISOC support\n"); | 2199 | dev_err(hsotg->dev, "no current ISOC support\n"); |
2198 | return -EINVAL; | 2200 | ret = -EINVAL; |
2201 | goto out; | ||
2199 | 2202 | ||
2200 | case USB_ENDPOINT_XFER_BULK: | 2203 | case USB_ENDPOINT_XFER_BULK: |
2201 | epctrl |= S3C_DxEPCTL_EPType_Bulk; | 2204 | epctrl |= S3C_DxEPCTL_EPType_Bulk; |
@@ -2234,8 +2237,9 @@ static int s3c_hsotg_ep_enable(struct usb_ep *ep, | |||
2234 | /* enable the endpoint interrupt */ | 2237 | /* enable the endpoint interrupt */ |
2235 | s3c_hsotg_ctrl_epint(hsotg, index, dir_in, 1); | 2238 | s3c_hsotg_ctrl_epint(hsotg, index, dir_in, 1); |
2236 | 2239 | ||
2240 | out: | ||
2237 | spin_unlock_irqrestore(&hs_ep->lock, flags); | 2241 | spin_unlock_irqrestore(&hs_ep->lock, flags); |
2238 | return 0; | 2242 | return ret; |
2239 | } | 2243 | } |
2240 | 2244 | ||
2241 | static int s3c_hsotg_ep_disable(struct usb_ep *ep) | 2245 | static int s3c_hsotg_ep_disable(struct usb_ep *ep) |