staging: usbip: simplified cleanup function
authorKurt Kanzenbach <ly80toro@cip.cs.fau.de>
Thu, 4 Apr 2013 14:03:11 +0000 (16:03 +0200)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Fri, 5 Apr 2013 21:22:51 +0000 (14:22 -0700)
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>
drivers/staging/usbip/stub_dev.c

index c75ae63a59c256c27dcef0968c40322d7f1ee11e..83d629afdfe12480769a33b041701fc271bd8a8b 100644 (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;
 }
 
 /*