提交 e134201b 编写于 作者: S Sudip Mukherjee 提交者: Greg Kroah-Hartman

staging: panel: return register value

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: NSudip Mukherjee <sudip@vectorindia.org>
Acked-by: NWilly Tarreau <w@1wt.eu>
Signed-off-by: NGreg Kroah-Hartman <gregkh@linuxfoundation.org>
上级 bb046fef
...@@ -2282,7 +2282,7 @@ static struct parport_driver panel_driver = { ...@@ -2282,7 +2282,7 @@ static struct parport_driver panel_driver = {
/* init function */ /* init function */
static int __init panel_init_module(void) static int __init panel_init_module(void)
{ {
int selected_keypad_type = NOT_SET; int selected_keypad_type = NOT_SET, err;
/* take care of an eventual profile */ /* take care of an eventual profile */
switch (profile) { switch (profile) {
...@@ -2388,9 +2388,10 @@ static int __init panel_init_module(void) ...@@ -2388,9 +2388,10 @@ static int __init panel_init_module(void)
return -ENODEV; return -ENODEV;
} }
if (parport_register_driver(&panel_driver)) { err = parport_register_driver(&panel_driver);
if (err) {
pr_err("could not register with parport. Aborting.\n"); pr_err("could not register with parport. Aborting.\n");
return -EIO; return err;
} }
if (pprt) if (pprt)
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册