From: Jeff Moyer <jmoyer@redhat.com>
To: Julia Lawall <Julia.Lawall@lip6.fr>
Cc: Felipe Balbi <balbi@ti.com>,
kernel-janitors@vger.kernel.org,
Greg Kroah-Hartman <gregkh@linuxfoundation.org>,
linux-usb@vger.kernel.org, linux-kernel@vger.kernel.org
Subject: Re: [PATCH 4/4] usb: gadget: fix error return code
Date: Thu, 07 Aug 2014 17:50:08 -0400 [thread overview]
Message-ID: <x49oavw9dgv.fsf@segfault.boston.devel.redhat.com> (raw)
In-Reply-To: <1407445067-4044-5-git-send-email-Julia.Lawall@lip6.fr> (Julia Lawall's message of "Thu, 7 Aug 2014 22:57:47 +0200")
Julia Lawall <Julia.Lawall@lip6.fr> writes:
> diff --git a/drivers/usb/gadget/udc/fusb300_udc.c b/drivers/usb/gadget/udc/fusb300_udc.c
> index d40255f..5c5d1ad 100644
> --- a/drivers/usb/gadget/udc/fusb300_udc.c
> +++ b/drivers/usb/gadget/udc/fusb300_udc.c
> @@ -1398,13 +1398,17 @@ static int fusb300_probe(struct platform_device *pdev)
>
> /* initialize udc */
> fusb300 = kzalloc(sizeof(struct fusb300), GFP_KERNEL);
> - if (fusb300 == NULL)
> + if (fusb300 == NULL) {
> + ret = -ENOMEM;
> goto clean_up;
> + }
>
> for (i = 0; i < FUSB300_MAX_NUM_EP; i++) {
> _ep[i] = kzalloc(sizeof(struct fusb300_ep), GFP_KERNEL);
> - if (_ep[i] == NULL)
> + if (_ep[i] == NULL) {
> + ret = -ENOMEM;
> goto clean_up;
> + }
> fusb300->ep[i] = _ep[i];
> }
Reviewed-by: Jeff Moyer <jmoyer@redhat.com>
prev parent reply other threads:[~2014-08-07 21:50 UTC|newest]
Thread overview: 11+ messages / expand[flat|nested] mbox.gz Atom feed top
2014-08-07 20:57 [PATCH 0/4] " Julia Lawall
2014-08-07 20:57 ` [PATCH 2/4] gdrom: " Julia Lawall
2014-08-07 21:41 ` Jeff Moyer
2014-08-07 20:57 ` [PATCH 1/4] umem: " Julia Lawall
2014-08-07 21:41 ` Jeff Moyer
2014-08-07 20:57 ` [PATCH 3/4] block: " Julia Lawall
2014-08-07 21:48 ` Jeff Moyer
2014-08-08 4:58 ` Julia Lawall
2014-08-08 9:21 ` Dan Carpenter
2014-08-07 20:57 ` [PATCH 4/4] usb: gadget: " Julia Lawall
2014-08-07 21:50 ` Jeff Moyer [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=x49oavw9dgv.fsf@segfault.boston.devel.redhat.com \
--to=jmoyer@redhat.com \
--cc=Julia.Lawall@lip6.fr \
--cc=balbi@ti.com \
--cc=gregkh@linuxfoundation.org \
--cc=kernel-janitors@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-usb@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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox
all inboxes | Powered by JetHome®