diff options
Diffstat (limited to 'drivers')
-rw-r--r-- | drivers/net/usb/hso.c | 9 |
1 files changed, 5 insertions, 4 deletions
diff --git a/drivers/net/usb/hso.c b/drivers/net/usb/hso.c index 6e42b5a8c22b..8b2b947b6757 100644 --- a/drivers/net/usb/hso.c +++ b/drivers/net/usb/hso.c | |||
@@ -2211,14 +2211,14 @@ static struct hso_device *hso_create_bulk_serial_device( | |||
2211 | USB_DIR_IN); | 2211 | USB_DIR_IN); |
2212 | if (!serial->in_endp) { | 2212 | if (!serial->in_endp) { |
2213 | dev_err(&interface->dev, "Failed to find BULK IN ep\n"); | 2213 | dev_err(&interface->dev, "Failed to find BULK IN ep\n"); |
2214 | goto exit; | 2214 | goto exit2; |
2215 | } | 2215 | } |
2216 | 2216 | ||
2217 | if (! | 2217 | if (! |
2218 | (serial->out_endp = | 2218 | (serial->out_endp = |
2219 | hso_get_ep(interface, USB_ENDPOINT_XFER_BULK, USB_DIR_OUT))) { | 2219 | hso_get_ep(interface, USB_ENDPOINT_XFER_BULK, USB_DIR_OUT))) { |
2220 | dev_err(&interface->dev, "Failed to find BULK IN ep\n"); | 2220 | dev_err(&interface->dev, "Failed to find BULK IN ep\n"); |
2221 | goto exit; | 2221 | goto exit2; |
2222 | } | 2222 | } |
2223 | 2223 | ||
2224 | serial->write_data = hso_std_serial_write_data; | 2224 | serial->write_data = hso_std_serial_write_data; |
@@ -2231,9 +2231,10 @@ static struct hso_device *hso_create_bulk_serial_device( | |||
2231 | 2231 | ||
2232 | /* done, return it */ | 2232 | /* done, return it */ |
2233 | return hso_dev; | 2233 | return hso_dev; |
2234 | |||
2235 | exit2: | ||
2236 | hso_serial_common_free(serial); | ||
2234 | exit: | 2237 | exit: |
2235 | if (hso_dev && serial) | ||
2236 | hso_serial_common_free(serial); | ||
2237 | kfree(serial); | 2238 | kfree(serial); |
2238 | hso_free_device(hso_dev); | 2239 | hso_free_device(hso_dev); |
2239 | return NULL; | 2240 | return NULL; |