staging: unisys: visorbus: visorbus_main.c: Fix return values for checks in visorbus_...
authorSameer Wadgaonkar <sameer.wadgaonkar@unisys.com>
Wed, 30 Aug 2017 17:36:10 +0000 (13:36 -0400)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Thu, 31 Aug 2017 16:17:38 +0000 (18:17 +0200)
The error return values for the drv->probe, drv->remove, drv->pause
and drv->resume checks should be -EINVAL instead of -ENODEV.

Reported-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Signed-off-by: Sameer Wadgaonkar <sameer.wadgaonkar@unisys.com>
Signed-off-by: David Kershner <david.kershner@unisys.com>
Reviewed-by: Tim Sell <timothy.sell@unisys.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/staging/unisys/visorbus/visorbus_main.c

index d9b0a8bd3c70c8b5b96dca5f0b31f56fb5148bce..05b632e972411230d3590677a401690724d849c0 100644 (file)
@@ -969,16 +969,16 @@ int visorbus_register_visor_driver(struct visor_driver *drv)
                return -ENODEV;
 
        if (!drv->probe)
-               return -ENODEV;
+               return -EINVAL;
 
        if (!drv->remove)
-               return -ENODEV;
+               return -EINVAL;
 
        if (!drv->pause)
-               return -ENODEV;
+               return -EINVAL;
 
        if (!drv->resume)
-               return -ENODEV;
+               return -EINVAL;
 
        drv->driver.name = drv->name;
        drv->driver.bus = &visorbus_type;