From 3459e83a141e2af284c5980917dfa8a1bb224319 Mon Sep 17 00:00:00 2001 From: Sameer Wadgaonkar Date: Wed, 30 Aug 2017 13:36:10 -0400 Subject: [PATCH] staging: unisys: visorbus: visorbus_main.c: Fix return values for checks in visorbus_register_visor_driver. 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 Signed-off-by: Sameer Wadgaonkar Signed-off-by: David Kershner Reviewed-by: Tim Sell Signed-off-by: Greg Kroah-Hartman --- drivers/staging/unisys/visorbus/visorbus_main.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/drivers/staging/unisys/visorbus/visorbus_main.c b/drivers/staging/unisys/visorbus/visorbus_main.c index d9b0a8bd3c70..05b632e97241 100644 --- a/drivers/staging/unisys/visorbus/visorbus_main.c +++ b/drivers/staging/unisys/visorbus/visorbus_main.c @@ -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; -- 2.20.1