lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [thread-next>] [day] [month] [year] [list]
Message-ID: <1295534730.2089.1.camel@offworld>
Date:	Thu, 20 Jan 2011 11:45:30 -0300
From:	Davidlohr Bueso <dave@....org>
To:	Dmitry Torokhov <dtor@...l.ru>, LKML <linux-kernel@...r.kernel.org>
Cc:	linux-serial@...r.kernel.org
Subject: [PATCH] input: trackpoint: return proper error value

From: Davidlohr Bueso <dave@....org>

If sysfs_create_group() returns an error, we should return it in trackpoint_detect(), instead of -1.

Signed-off-by: Davidlohr Bueso <dave@....org>
---
 drivers/input/mouse/trackpoint.c |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)

diff --git a/drivers/input/mouse/trackpoint.c b/drivers/input/mouse/trackpoint.c
index 54b2fa8..e8b7c3f 100644
--- a/drivers/input/mouse/trackpoint.c
+++ b/drivers/input/mouse/trackpoint.c
@@ -324,7 +324,7 @@ int trackpoint_detect(struct psmouse *psmouse, bool set_properties)
 			error);
 		kfree(psmouse->private);
 		psmouse->private = NULL;
-		return -1;
+		return error;
 	}
 
 	printk(KERN_INFO "IBM TrackPoint firmware: 0x%02x, buttons: %d/%d\n",
-- 
1.7.1



--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ