[PATCH 2/3] staging: panel: return register value

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



we were returning success even if the module failed to register.
now we are returning the actual return value, success or error.

Signed-off-by: Sudip Mukherjee <sudip@xxxxxxxxxxxxxxx>
---
 drivers/staging/panel/panel.c | 7 +------
 1 file changed, 1 insertion(+), 6 deletions(-)

diff --git a/drivers/staging/panel/panel.c b/drivers/staging/panel/panel.c
index 3ef3dcf..b4c143a 100644
--- a/drivers/staging/panel/panel.c
+++ b/drivers/staging/panel/panel.c
@@ -2360,11 +2360,6 @@ static int __init panel_init_module(void)
 		return -ENODEV;
 	}
 
-	if (parport_register_driver(&panel_driver)) {
-		pr_err("could not register with parport. Aborting.\n");
-		return -EIO;
-	}
-
 	if (pprt)
 		pr_info("driver version " PANEL_VERSION
 			" registered on parport%d (io=0x%lx).\n", parport,
@@ -2375,7 +2370,7 @@ static int __init panel_init_module(void)
 	/* tells various subsystems about the fact that initialization
 	   is finished */
 	init_in_progress = 0;
-	return 0;
+	return parport_register_driver(&panel_driver);
 }
 
 static void __exit panel_cleanup_module(void)
-- 
1.8.1.2

_______________________________________________
devel mailing list
devel@xxxxxxxxxxxxxxxxxxxxxx
http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel




[Index of Archives]     [Linux Driver Backports]     [DMA Engine]     [Linux GPIO]     [Linux SPI]     [Video for Linux]     [Linux USB Devel]     [Linux Coverity]     [Linux Audio Users]     [Linux Kernel]     [Linux SCSI]     [Yosemite Backpacking]
  Powered by Linux