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 for Android: free password hash cracker in your pocket
[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Date:   Wed, 26 May 2021 12:40:38 +0200 (CEST)
From:   Jiri Kosina <jikos@...nel.org>
To:     Zhen Lei <thunder.leizhen@...wei.com>
cc:     Benjamin Tissoires <benjamin.tissoires@...hat.com>,
        Anssi Hannula <anssi.hannula@...il.com>,
        Dmitry Torokhov <dtor@...l.ru>,
        linux-usb <linux-usb@...r.kernel.org>,
        linux-input <linux-input@...r.kernel.org>,
        linux-kernel <linux-kernel@...r.kernel.org>
Subject: Re: [PATCH 1/1] HID: pidff: fix error return code in
 hid_pidff_init()

On Sat, 8 May 2021, Zhen Lei wrote:

> Fix to return a negative error code from the error handling
> case instead of 0, as done elsewhere in this function.
> 
> Fixes: 224ee88fe395 ("Input: add force feedback driver for PID devices")
> Reported-by: Hulk Robot <hulkci@...wei.com>
> Signed-off-by: Zhen Lei <thunder.leizhen@...wei.com>
> ---
>  drivers/hid/usbhid/hid-pidff.c | 1 +
>  1 file changed, 1 insertion(+)
> 
> diff --git a/drivers/hid/usbhid/hid-pidff.c b/drivers/hid/usbhid/hid-pidff.c
> index ea126c50acc3..3b4ee21cd811 100644
> --- a/drivers/hid/usbhid/hid-pidff.c
> +++ b/drivers/hid/usbhid/hid-pidff.c
> @@ -1292,6 +1292,7 @@ int hid_pidff_init(struct hid_device *hid)
>  
>  	if (pidff->pool[PID_DEVICE_MANAGED_POOL].value &&
>  	    pidff->pool[PID_DEVICE_MANAGED_POOL].value[0] == 0) {
> +		error = -EPERM;
>  		hid_notice(hid,
>  			   "device does not support device managed pool\n");
>  		goto fail;

Good catch, applied, thank you.

-- 
Jiri Kosina
SUSE Labs

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ