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>
This commit is contained in:
Kurt Kanzenbach 2013-04-04 16:03:11 +02:00 committed by Greg Kroah-Hartman
parent 521e1e7cc9
commit b94b3a627f
1 changed files with 1 additions and 7 deletions

View File

@ -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;
}
/*