linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Tom Rix <trix@redhat.com>
To: Jiri Kosina <jikos@kernel.org>,
	Michael Zaidman <michael.zaidman@gmail.com>
Cc: benjamin.tissoires@redhat.com, linux-i2c@vger.kernel.org,
	linux-input@vger.kernel.org, linux-kernel@vger.kernel.org
Subject: Re: [PATCH v4] HID: ft260: improve error handling of ft260_hid_feature_report_get()
Date: Thu, 13 May 2021 06:15:38 -0700	[thread overview]
Message-ID: <8c48cdcc-ee47-3352-4023-db24b7a94759@redhat.com> (raw)
In-Reply-To: <nycvar.YFH.7.76.2105131308260.28378@cbobk.fhfr.pm>


On 5/13/21 4:09 AM, Jiri Kosina wrote:
> On Tue, 11 May 2021, Michael Zaidman wrote:
>
>> Fixes: 6a82582d9fa4 ("HID: ft260: add usb hid to i2c host bridge driver")
>>
>> The ft260_hid_feature_report_get() checks if the return size matches
>> the requested size. But the function can also fail with at least -ENOMEM.
>> Add the < 0 checks.
>>
>> In ft260_hid_feature_report_get(), do not do the memcpy to the caller's
>> buffer if there is an error.
>>
>> ---
>> v4   Fixed commit message
>> ---
>> v3   Simplify and optimize the changes
>> ---
>> v2:  add unlikely()'s for error conditions
>> ---
>>
>> Signed-off-by: Tom Rix <trix@redhat.com>
>> Signed-off-by: Michael Zaidman <michael.zaidman@gmail.com>
> Who should be the author of the git commit?

Go with the latest patch's author, Micheal.

Tom

>
> Thanks,
>


      reply	other threads:[~2021-05-13 13:16 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-05-11 10:12 [PATCH v4] HID: ft260: improve error handling of ft260_hid_feature_report_get() Michael Zaidman
2021-05-11 13:10 ` Tom Rix
2021-05-11 14:34   ` Michael Zaidman
2021-05-11 15:03     ` Tom Rix
2021-05-13 11:09 ` Jiri Kosina
2021-05-13 13:15   ` Tom Rix [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=8c48cdcc-ee47-3352-4023-db24b7a94759@redhat.com \
    --to=trix@redhat.com \
    --cc=benjamin.tissoires@redhat.com \
    --cc=jikos@kernel.org \
    --cc=linux-i2c@vger.kernel.org \
    --cc=linux-input@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=michael.zaidman@gmail.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;
as well as URLs for NNTP newsgroup(s).