All of lore.kernel.org
 help / color / mirror / Atom feed
From: Davidlohr Bueso <dave@gnu.org>
To: Dmitry Torokhov <dtor@mail.ru>, LKML <linux-kernel@vger.kernel.org>
Cc: linux-serial@vger.kernel.org
Subject: [PATCH] input: trackpoint: return proper error value
Date: Thu, 20 Jan 2011 11:45:30 -0300	[thread overview]
Message-ID: <1295534730.2089.1.camel@offworld> (raw)

From: Davidlohr Bueso <dave@gnu.org>

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

Signed-off-by: Davidlohr Bueso <dave@gnu.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




             reply	other threads:[~2011-01-20 14:46 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2011-01-20 14:45 Davidlohr Bueso [this message]
2011-01-21  7:36 ` [PATCH] input: trackpoint: return proper error value Dmitry Torokhov

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=1295534730.2089.1.camel@offworld \
    --to=dave@gnu.org \
    --cc=dtor@mail.ru \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-serial@vger.kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.