Commit b94b3a62 authored by Kurt Kanzenbach's avatar Kurt Kanzenbach Committed by Greg Kroah-Hartman

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: default avatarKurt Kanzenbach <ly80toro@cip.cs.fau.de>
Signed-off-by: default avatarStefan Reif <ke42caxa@cip.cs.fau.de>
Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@linuxfoundation.org>
parent 521e1e7c
...@@ -327,15 +327,9 @@ static struct stub_device *stub_device_alloc(struct usb_device *udev, ...@@ -327,15 +327,9 @@ static struct stub_device *stub_device_alloc(struct usb_device *udev,
return sdev; 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); kfree(sdev);
pr_debug("kfree udev ok\n");
return 0;
} }
/* /*
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment