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 a3013852c0e0c319ff8be81a18fa8f18c2019cbc..c0badfa5a46f041eeb4dd52f21a80d077ea2eb9e 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);