All of lore.kernel.org
 help / color / mirror / Atom feed
From: Rahul Rameshbabu <rrameshbabu@nvidia.com>
To: Chen Ni <nichen@iscas.ac.cn>
Cc: jikos@kernel.org, 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: Wed, 15 May 2024 07:59:33 -0700	[thread overview]
Message-ID: <87jzjvgkn1.fsf@nvidia.com> (raw)
In-Reply-To: <20240515033051.2693390-1-nichen@iscas.ac.cn>


On Wed, 15 May, 2024 11:30:51 +0800 Chen Ni <nichen@iscas.ac.cn> 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.
>

You will need a Fixes: tag here.

Fixes: 09308562d4af ("HID: nvidia-shield: Initial driver implementation with Thunderstrike support")
> 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;
>  
>  	ret = input_register_device(haptics);
>  	if (ret)

I applied and tested the patch locally, and it looked good. If Jiri or
Benjamin can apply the patch with the updated trailer, then you can add
my Reviewed-by: trailer.

Reviewed-by: Rahul Rameshbabu <rrameshbabu@nvidia.com>

  reply	other threads:[~2024-05-15 15:28 UTC|newest]

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

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=87jzjvgkn1.fsf@nvidia.com \
    --to=rrameshbabu@nvidia.com \
    --cc=bentiss@kernel.org \
    --cc=jikos@kernel.org \
    --cc=linux-input@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=nichen@iscas.ac.cn \
    /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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.