From: Kurt Kanzenbach Date: Thu, 4 Apr 2013 14:03:11 +0000 (+0200) Subject: staging: usbip: simplified cleanup function X-Git-Tag: v3.10-rc1~192^2~313 X-Git-Url: https://openfabrics.org/gitweb/?a=commitdiff_plain;h=b94b3a627f415b17f5451e2cd607164655f30491;p=~emulex%2Finfiniband.git 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 Signed-off-by: Stefan Reif Signed-off-by: Greg Kroah-Hartman --- diff --git a/drivers/staging/usbip/stub_dev.c b/drivers/staging/usbip/stub_dev.c index c75ae63a59c..83d629afdfe 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; } /*