All of lore.kernel.org
 help / color / mirror / Atom feed
From: Hangyu Hua <hbh25y@gmail.com>
To: lains@riseup.net, jikos@kernel.org, benjamin.tissoires@redhat.com
Cc: linux-input@vger.kernel.org, linux-kernel@vger.kernel.org
Subject: Re: [PATCH] hid: hid-logitech-hidpp: avoid unnecessary assignments in hidpp_connect_event
Date: Tue, 6 Sep 2022 15:57:13 +0800	[thread overview]
Message-ID: <64a3bd41-1184-e65b-e70f-01ef8daadb53@gmail.com> (raw)
In-Reply-To: <20220812025515.19467-1-hbh25y@gmail.com>

On 12/8/2022 10:55, Hangyu Hua wrote:
> hidpp->delayed_input can't be assigned to an object that already call
> input_free_device when input_register_device fails.
> 
> Fixes: c39e3d5fc9dd ("HID: logitech-hidpp: late bind the input device on wireless connection")
> Signed-off-by: Hangyu Hua <hbh25y@gmail.com>
> ---
>   drivers/hid/hid-logitech-hidpp.c | 4 +++-
>   1 file changed, 3 insertions(+), 1 deletion(-)
> 
> diff --git a/drivers/hid/hid-logitech-hidpp.c b/drivers/hid/hid-logitech-hidpp.c
> index 68f9e9d207f4..c3602bf8f9b9 100644
> --- a/drivers/hid/hid-logitech-hidpp.c
> +++ b/drivers/hid/hid-logitech-hidpp.c
> @@ -3959,8 +3959,10 @@ static void hidpp_connect_event(struct hidpp_device *hidpp)
>   	hidpp_populate_input(hidpp, input);
>   
>   	ret = input_register_device(input);
> -	if (ret)
> +	if (ret) {
>   		input_free_device(input);
> +		return;
> +	}
>   
>   	hidpp->delayed_input = input;
>   }
Gentel ping.

  reply	other threads:[~2022-09-06  7:57 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-08-12  2:55 [PATCH] hid: hid-logitech-hidpp: avoid unnecessary assignments in hidpp_connect_event Hangyu Hua
2022-09-06  7:57 ` Hangyu Hua [this message]
2022-09-20 13:36   ` Benjamin Tissoires

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=64a3bd41-1184-e65b-e70f-01ef8daadb53@gmail.com \
    --to=hbh25y@gmail.com \
    --cc=benjamin.tissoires@redhat.com \
    --cc=jikos@kernel.org \
    --cc=lains@riseup.net \
    --cc=linux-input@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    /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.