mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Jiri Kosina <jikos@kernel.org>
To: Chen Ni <nichen@iscas.ac.cn>
Cc: rrameshbabu@nvidia.com, bentiss@kernel.org,
	linux-input@vger.kernel.org,  linux-kernel@vger.kernel.org
Subject: Re: [PATCH] HID: nvidia-shield: Add missing check for input_ff_create_memless
Date: Thu, 23 May 2024 14:17:56 +0200 (CEST)	[thread overview]
Message-ID: <nycvar.YFH.7.76.2405231417500.16865@cbobk.fhfr.pm> (raw)
In-Reply-To: <20240515033051.2693390-1-nichen@iscas.ac.cn>

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@iscas.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


      parent reply	other threads:[~2024-05-23 12:17 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2024-05-15  3:30 Chen Ni
2024-05-15 14:59 ` Rahul Rameshbabu
2024-05-15 15:48   ` Benjamin Tissoires
2024-05-23 12:17 ` Jiri Kosina [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=nycvar.YFH.7.76.2405231417500.16865@cbobk.fhfr.pm \
    --to=jikos@kernel.org \
    --cc=bentiss@kernel.org \
    --cc=linux-input@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=nichen@iscas.ac.cn \
    --cc=rrameshbabu@nvidia.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox

all inboxes | Powered by JetHome®