staging: unisys: visorbus: check parahotplug_request_complete_result
authorErik Arfvidson <erik.arfvidson@unisys.com>
Sat, 11 Jun 2016 01:48:00 +0000 (21:48 -0400)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Mon, 15 Aug 2016 18:44:24 +0000 (20:44 +0200)
This patch modifies the caller of parahotplug_request_complete()
to check the return value and return appropriate result.

Signed-off-by: Erik Arfvidson <erik.arfvidson@unisys.com>
Signed-off-by: David Kershner <david.kershner@unisys.com>
Reviewed-by: Tim Sell <Timothy.Sell@unisys.com>
Acked-By: Neil Horman <nhorman@tuxdriver.com>
Reviewed-by: Thomas Gleixner <tglx@linutronix.de>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/staging/unisys/visorbus/visorchipset.c

index d248c946a13b169dc877e7f53b5c5393779d479e..7f44913bad75675f5d496a73d4791e0a25a89ef8 100644 (file)
@@ -2036,11 +2036,14 @@ static ssize_t devicedisabled_store(struct device *dev,
                                    const char *buf, size_t count)
 {
        unsigned int id;
+       int err;
 
        if (kstrtouint(buf, 10, &id))
                return -EINVAL;
 
-       parahotplug_request_complete(id, 0);
+       err = parahotplug_request_complete(id, 0);
+       if (err < 0)
+               return err;
        return count;
 }