[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <nycvar.YFH.7.76.2105261240280.28378@cbobk.fhfr.pm>
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