diff options
Diffstat (limited to 'drivers/net/usb')
-rw-r--r-- | drivers/net/usb/kaweth.c | 18 |
1 files changed, 11 insertions, 7 deletions
diff --git a/drivers/net/usb/kaweth.c b/drivers/net/usb/kaweth.c index e2a39b9be96e..e391ef969c28 100644 --- a/drivers/net/usb/kaweth.c +++ b/drivers/net/usb/kaweth.c | |||
@@ -263,6 +263,7 @@ static int kaweth_control(struct kaweth_device *kaweth, | |||
263 | int timeout) | 263 | int timeout) |
264 | { | 264 | { |
265 | struct usb_ctrlrequest *dr; | 265 | struct usb_ctrlrequest *dr; |
266 | int retval; | ||
266 | 267 | ||
267 | dbg("kaweth_control()"); | 268 | dbg("kaweth_control()"); |
268 | 269 | ||
@@ -278,18 +279,21 @@ static int kaweth_control(struct kaweth_device *kaweth, | |||
278 | return -ENOMEM; | 279 | return -ENOMEM; |
279 | } | 280 | } |
280 | 281 | ||
281 | dr->bRequestType= requesttype; | 282 | dr->bRequestType = requesttype; |
282 | dr->bRequest = request; | 283 | dr->bRequest = request; |
283 | dr->wValue = cpu_to_le16(value); | 284 | dr->wValue = cpu_to_le16(value); |
284 | dr->wIndex = cpu_to_le16(index); | 285 | dr->wIndex = cpu_to_le16(index); |
285 | dr->wLength = cpu_to_le16(size); | 286 | dr->wLength = cpu_to_le16(size); |
286 | 287 | ||
287 | return kaweth_internal_control_msg(kaweth->dev, | 288 | retval = kaweth_internal_control_msg(kaweth->dev, |
288 | pipe, | 289 | pipe, |
289 | dr, | 290 | dr, |
290 | data, | 291 | data, |
291 | size, | 292 | size, |
292 | timeout); | 293 | timeout); |
294 | |||
295 | kfree(dr); | ||
296 | return retval; | ||
293 | } | 297 | } |
294 | 298 | ||
295 | /**************************************************************** | 299 | /**************************************************************** |