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@vectorindia.org>
Acked-by: Willy Tarreau <w@1wt.eu>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
/* init function */
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 */
switch (profile) {
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");
- return -EIO;
+ return err;
}
if (pprt)