From: Sergei Shtylyov <sergei.shtylyov@cogentembedded.com>
To: Robert Baldyga <r.baldyga@samsung.com>
Cc: balbi@ti.com, gregkh@linuxfoundation.org,
linux-usb@vger.kernel.org, linux-kernel@vger.kernel.org,
mina86@mina86.com, b.zolnierkie@samsung.com,
m.szyprowski@samsung.com, andrzej.p@samsung.com
Subject: Re: [PATCH] USB: gadget: f_fs: fix error handling
Date: Fri, 27 Sep 2013 22:20:00 +0400 [thread overview]
Message-ID: <5245CC50.9050906@cogentembedded.com> (raw)
In-Reply-To: <1380277734-17590-1-git-send-email-r.baldyga@samsung.com>
Hello.
On 09/27/2013 02:28 PM, Robert Baldyga wrote:
> This patch add missing error check in ffs_func_bind() function, after
> ffs_do_descs() funcion call for hs descriptors. Without this check it's
s/funcion/function/.
Perhaps it's worth expanding "hs" to "high speed" for clarity?
> possible that the module will try dereference incorrect pointer.
> Signed-off-by: Robert Baldyga <r.baldyga@samsung.com>
> ---
> drivers/usb/gadget/f_fs.c | 3 +++
> 1 file changed, 3 insertions(+)
> diff --git a/drivers/usb/gadget/f_fs.c b/drivers/usb/gadget/f_fs.c
> index 1a66c5b..fe7d532 100644
> --- a/drivers/usb/gadget/f_fs.c
> +++ b/drivers/usb/gadget/f_fs.c
> @@ -2264,7 +2264,10 @@ static int ffs_func_bind(struct usb_configuration *c,
> data->raw_descs + ret,
> (sizeof data->raw_descs) - ret,
> __ffs_func_bind_do_descs, func);
> + if (unlikely(ret < 0))
> + goto error;
> }
> +
>
Why add second empty line here?
> /*
> * Now handle interface numbers allocation and interface and
WBR, Sergei
prev parent reply other threads:[~2013-09-27 18:20 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2013-09-27 10:28 [PATCH] USB: gadget: f_fs: fix error handling Robert Baldyga
2013-09-27 14:05 ` Michal Nazarewicz
2013-09-27 18:20 ` Sergei Shtylyov [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=5245CC50.9050906@cogentembedded.com \
--to=sergei.shtylyov@cogentembedded.com \
--cc=andrzej.p@samsung.com \
--cc=b.zolnierkie@samsung.com \
--cc=balbi@ti.com \
--cc=gregkh@linuxfoundation.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-usb@vger.kernel.org \
--cc=m.szyprowski@samsung.com \
--cc=mina86@mina86.com \
--cc=r.baldyga@samsung.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.