Re: [PATCH] input: trackpoint: return proper error value

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Thu, Jan 20, 2011 at 11:45:30AM -0300, Davidlohr Bueso wrote:
> From: Davidlohr Bueso <dave@xxxxxxx>
> 
> If sysfs_create_group() returns an error, we should return it in trackpoint_detect(), instead of -1.
> 
> Signed-off-by: Davidlohr Bueso <dave@xxxxxxx>
> ---
>  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-serial" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html


[Index of Archives]     [Kernel Newbies]     [Security]     [Netfilter]     [Bugtraq]     [Linux PPP]     [Linux FS]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Samba]     [Video 4 Linux]     [Linmodem]     [Device Mapper]     [Linux Kernel for ARM]

  Powered by Linux