diff options
author | Kurt Kanzenbach <ly80toro@cip.cs.fau.de> | 2013-04-04 18:03:11 +0400 |
---|---|---|
committer | Greg Kroah-Hartman <gregkh@linuxfoundation.org> | 2013-04-06 01:22:51 +0400 |
commit | b94b3a627f415b17f5451e2cd607164655f30491 (patch) | |
tree | 6c64adfab35f5b5c2cb3cc66e68778c67bc5f179 /drivers | |
parent | 521e1e7cc9c641caa892d420034fcfe3f2ad6ae5 (diff) | |
download | linux-b94b3a627f415b17f5451e2cd607164655f30491.tar.xz |
staging: usbip: simplified cleanup function
This patch simplified "stub_device_free" cleanup function:
- changed return type to void, since the return value is
not checked anywhere
- kfree is NULL-safe, so removed if statement
- deleted debug-message
Signed-off-by: Kurt Kanzenbach <ly80toro@cip.cs.fau.de>
Signed-off-by: Stefan Reif <ke42caxa@cip.cs.fau.de>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Diffstat (limited to 'drivers')
-rw-r--r-- | drivers/staging/usbip/stub_dev.c | 8 |
1 files changed, 1 insertions, 7 deletions
diff --git a/drivers/staging/usbip/stub_dev.c b/drivers/staging/usbip/stub_dev.c index c75ae63a59c2..83d629afdfe1 100644 --- a/drivers/staging/usbip/stub_dev.c +++ b/drivers/staging/usbip/stub_dev.c @@ -327,15 +327,9 @@ static struct stub_device *stub_device_alloc(struct usb_device *udev, return sdev; } -static int stub_device_free(struct stub_device *sdev) +static void stub_device_free(struct stub_device *sdev) { - if (!sdev) - return -EINVAL; - kfree(sdev); - pr_debug("kfree udev ok\n"); - - return 0; } /* |