staging: unisys: fix return value for visorbus pci probe
authorBenjamin Romer <benjamin.romer@unisys.com>
Tue, 23 Feb 2016 15:01:49 +0000 (10:01 -0500)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Fri, 26 Feb 2016 06:40:52 +0000 (22:40 -0800)
Instead of returning -1, return -ENODEV when there is no probe function
found for the device.

Signed-off-by: Benjamin Romer <benjamin.romer@unisys.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/staging/unisys/visorbus/visorbus_main.c

index a301385..c0badfa 100644 (file)
@@ -771,7 +771,7 @@ visordriver_probe_device(struct device *xdev)
        get_device(&dev->device);
        if (!drv->probe) {
                up(&dev->visordriver_callback_lock);
-               rc = -1;
+               rc = -ENODEV;
                goto away;
        }
        rc = drv->probe(dev);