[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <nycvar.YFH.7.76.2103081134130.12405@cbobk.fhfr.pm>
Date: Mon, 8 Mar 2021 11:34:18 +0100 (CET)
From: Jiri Kosina <jikos@...nel.org>
To: Jia-Ju Bai <baijiaju1990@...il.com>
cc: benjamin.tissoires@...hat.com, rydberg@...math.org,
linux-input@...r.kernel.org, linux-kernel@...r.kernel.org
Subject: Re: [PATCH] hid: hid-alps: fix error return code in
alps_input_configured()
On Thu, 4 Mar 2021, Jia-Ju Bai wrote:
> When input_register_device() fails, no error return code is assigned.
> To fix this bug, ret is assigned with -ENOENT as error return code.
>
> Reported-by: TOTE Robot <oslab@...nghua.edu.cn>
> Signed-off-by: Jia-Ju Bai <baijiaju1990@...il.com>
> ---
> drivers/hid/hid-alps.c | 1 +
> 1 file changed, 1 insertion(+)
>
> diff --git a/drivers/hid/hid-alps.c b/drivers/hid/hid-alps.c
> index 3feaece13ade..6b665931147d 100644
> --- a/drivers/hid/hid-alps.c
> +++ b/drivers/hid/hid-alps.c
> @@ -761,6 +761,7 @@ static int alps_input_configured(struct hid_device *hdev, struct hid_input *hi)
>
> if (input_register_device(data->input2)) {
> input_free_device(input2);
> + ret = -ENOENT;
> goto exit;
> }
> }
Applied, thanks.
--
Jiri Kosina
SUSE Labs
Powered by blists - more mailing lists