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-prev] [day] [month] [year] [list]
Message-ID: <20110121073605.GC21842@core.coreip.homeip.net>
Date:	Thu, 20 Jan 2011 23:36:05 -0800
From:	Dmitry Torokhov <dmitry.torokhov@...il.com>
To:	Davidlohr Bueso <dave@....org>
Cc:	LKML <linux-kernel@...r.kernel.org>, linux-serial@...r.kernel.org
Subject: Re: [PATCH] input: trackpoint: return proper error value

On Thu, Jan 20, 2011 at 11:45:30AM -0300, Davidlohr Bueso wrote:
> 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;

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
--
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