From: Dmitry Torokhov <dmitry.torokhov@gmail.com>
To: Davidlohr Bueso <dave@gnu.org>
Cc: LKML <linux-kernel@vger.kernel.org>, linux-serial@vger.kernel.org
Subject: Re: [PATCH] input: trackpoint: return proper error value
Date: Thu, 20 Jan 2011 23:36:05 -0800 [thread overview]
Message-ID: <20110121073605.GC21842@core.coreip.homeip.net> (raw)
In-Reply-To: <1295534730.2089.1.camel@offworld>
On Thu, Jan 20, 2011 at 11:45:30AM -0300, Davidlohr Bueso wrote:
> 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;
This is not the only place where we return -1 in place of proper error
code in that driver. Care to update all of them?
Thanks.
--
Dmitry
prev parent reply other threads:[~2011-01-21 7:36 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2011-01-20 14:45 Davidlohr Bueso
2011-01-21 7:36 ` Dmitry Torokhov [this message]
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=20110121073605.GC21842@core.coreip.homeip.net \
--to=dmitry.torokhov@gmail.com \
--cc=dave@gnu.org \
--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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox
all inboxes | Powered by JetHome®