From: Lorenzo Colitti <lorenzo@google.com>
To: Dan Carpenter <dan.carpenter@oracle.com>
Cc: Felipe Balbi <balbi@kernel.org>,
Greg Kroah-Hartman <gregkh@linuxfoundation.org>,
Nishad Kamdar <nishadkamdar@gmail.com>,
David Lechner <david@lechnology.com>,
linux-usb@vger.kernel.org, lkml <linux-kernel@vger.kernel.org>,
kernel-janitors@vger.kernel.org
Subject: Re: [PATCH] USB: gadget: Fix a configfs return code
Date: Tue, 16 Feb 2021 10:23:52 +0900 [thread overview]
Message-ID: <CAKD1Yr3Gpa4KZXzWDMO4-V-+16FCYPb4nUZMLde+cQLk+zRxaQ@mail.gmail.com> (raw)
In-Reply-To: <YCqZ3P53yyIg5cn7@mwanda>
On Tue, Feb 16, 2021 at 12:57 AM Dan Carpenter <dan.carpenter@oracle.com> wrote:
> { \
> struct f_##_f_##_opts *opts = to_f_##_f_##_opts(item); \
> - int ret; \
> + int ret = -EINVAL; \
> u8 val; \
> \
> mutex_lock(&opts->lock); \
> - ret = sscanf(page, "%02hhx", &val); \
> - if (ret > 0) { \
> + if (sscanf(page, "%02hhx", &val) > 0) { \
> opts->_n_ = val; \
> ret = len; \
> } \
Acked-by: Lorenzo Colitti <lorenzo@google.com>
WARNING: multiple messages have this Message-ID (diff)
From: Lorenzo Colitti <lorenzo@google.com>
To: Dan Carpenter <dan.carpenter@oracle.com>
Cc: Felipe Balbi <balbi@kernel.org>,
Greg Kroah-Hartman <gregkh@linuxfoundation.org>,
Nishad Kamdar <nishadkamdar@gmail.com>,
David Lechner <david@lechnology.com>,
linux-usb@vger.kernel.org, lkml <linux-kernel@vger.kernel.org>,
kernel-janitors@vger.kernel.org
Subject: Re: [PATCH] USB: gadget: Fix a configfs return code
Date: Tue, 16 Feb 2021 01:23:52 +0000 [thread overview]
Message-ID: <CAKD1Yr3Gpa4KZXzWDMO4-V-+16FCYPb4nUZMLde+cQLk+zRxaQ@mail.gmail.com> (raw)
In-Reply-To: <YCqZ3P53yyIg5cn7@mwanda>
On Tue, Feb 16, 2021 at 12:57 AM Dan Carpenter <dan.carpenter@oracle.com> wrote:
> { \
> struct f_##_f_##_opts *opts = to_f_##_f_##_opts(item); \
> - int ret; \
> + int ret = -EINVAL; \
> u8 val; \
> \
> mutex_lock(&opts->lock); \
> - ret = sscanf(page, "%02hhx", &val); \
> - if (ret > 0) { \
> + if (sscanf(page, "%02hhx", &val) > 0) { \
> opts->_n_ = val; \
> ret = len; \
> } \
Acked-by: Lorenzo Colitti <lorenzo@google.com>
next prev parent reply other threads:[~2021-02-16 1:25 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2021-02-15 15:57 [PATCH] USB: gadget: Fix a configfs return code Dan Carpenter
2021-02-15 15:57 ` Dan Carpenter
2021-02-16 1:23 ` Lorenzo Colitti [this message]
2021-02-16 1:23 ` Lorenzo Colitti
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=CAKD1Yr3Gpa4KZXzWDMO4-V-+16FCYPb4nUZMLde+cQLk+zRxaQ@mail.gmail.com \
--to=lorenzo@google.com \
--cc=balbi@kernel.org \
--cc=dan.carpenter@oracle.com \
--cc=david@lechnology.com \
--cc=gregkh@linuxfoundation.org \
--cc=kernel-janitors@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-usb@vger.kernel.org \
--cc=nishadkamdar@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 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.