aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/staging/panel/panel.c
diff options
context:
space:
mode:
authorSudip Mukherjee <sudipm.mukherjee@gmail.com>2015-03-09 20:08:24 +0530
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>2015-03-20 14:06:12 +0100
commite134201b7a27eaf1ce3affe39ea6f30a1a747186 (patch)
treea38ac281d25e81b9b4864a8c419d6f0f3e5a8228 /drivers/staging/panel/panel.c
parentstaging: panel: register reboot (diff)
downloadlinux-dev-e134201b7a27eaf1ce3affe39ea6f30a1a747186.tar.xz
linux-dev-e134201b7a27eaf1ce3affe39ea6f30a1a747186.zip
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: Sudip Mukherjee <sudip@vectorindia.org> Acked-by: Willy Tarreau <w@1wt.eu> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Diffstat (limited to 'drivers/staging/panel/panel.c')
-rw-r--r--drivers/staging/panel/panel.c7
1 files changed, 4 insertions, 3 deletions
diff --git a/drivers/staging/panel/panel.c b/drivers/staging/panel/panel.c
index ac147253cc54..ee26413cea47 100644
--- a/drivers/staging/panel/panel.c
+++ b/drivers/staging/panel/panel.c
@@ -2282,7 +2282,7 @@ static struct parport_driver panel_driver = {
/* 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) {
@@ -2388,9 +2388,10 @@ static int __init panel_init_module(void)
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)