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: <nycvar.YFH.7.76.2405231417500.16865@cbobk.fhfr.pm>
Date: Thu, 23 May 2024 14:17:56 +0200 (CEST)
From: Jiri Kosina <jikos@...nel.org>
To: Chen Ni <nichen@...as.ac.cn>
cc: rrameshbabu@...dia.com, bentiss@...nel.org, linux-input@...r.kernel.org, 
    linux-kernel@...r.kernel.org
Subject: Re: [PATCH] HID: nvidia-shield: Add missing check for
 input_ff_create_memless

On Wed, 15 May 2024, Chen Ni wrote:

> Add check for the return value of input_ff_create_memless() and return
> the error if it fails in order to catch the error.
> 
> Signed-off-by: Chen Ni <nichen@...as.ac.cn>
> ---
>  drivers/hid/hid-nvidia-shield.c | 4 +++-
>  1 file changed, 3 insertions(+), 1 deletion(-)
> 
> diff --git a/drivers/hid/hid-nvidia-shield.c b/drivers/hid/hid-nvidia-shield.c
> index 58b15750dbb0..ff9078ad1961 100644
> --- a/drivers/hid/hid-nvidia-shield.c
> +++ b/drivers/hid/hid-nvidia-shield.c
> @@ -283,7 +283,9 @@ static struct input_dev *shield_haptics_create(
>  		return haptics;
>  
>  	input_set_capability(haptics, EV_FF, FF_RUMBLE);
> -	input_ff_create_memless(haptics, NULL, play_effect);
> +	ret = input_ff_create_memless(haptics, NULL, play_effect);
> +	if (ret)
> +		goto err;
>  

Applied, thanks.

-- 
Jiri Kosina
SUSE Labs


Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ