From: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
To: Christophe JAILLET <christophe.jaillet@wanadoo.fr>
Cc: balbi@kernel.org, gregkh@linuxfoundation.org,
linux-usb@vger.kernel.org, linux-kernel@vger.kernel.org,
kernel-janitors@vger.kernel.org
Subject: Re: [PATCH] usb: gadget: uvc: Fix return value in case of error
Date: Sat, 16 Jul 2016 12:36:21 +0000 [thread overview]
Message-ID: <4105543.bTmzcC8hNY@avalon> (raw)
In-Reply-To: <1468652680-15781-1-git-send-email-christophe.jaillet@wanadoo.fr>
Hi Christophe,
Thank you for the patch.
On Saturday 16 Jul 2016 09:04:40 Christophe JAILLET wrote:
> If this memory allocation fail, we will return 0, which means success.
> Return -ENOMEM instead.
>
> Signed-off-by: Christophe JAILLET <christophe.jaillet@wanadoo.fr>
Reviewed-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
> ---
> drivers/usb/gadget/function/uvc_configfs.c | 2 +-
> 1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/drivers/usb/gadget/function/uvc_configfs.c
> b/drivers/usb/gadget/function/uvc_configfs.c index 66753ba..31125a4 100644
> --- a/drivers/usb/gadget/function/uvc_configfs.c
> +++ b/drivers/usb/gadget/function/uvc_configfs.c
> @@ -2023,7 +2023,7 @@ static int uvcg_streaming_class_allow_link(struct
> config_item *src, if (!data) {
> kfree(*class_array);
> *class_array = NULL;
> - ret = PTR_ERR(data);
> + ret = -ENOMEM;
> goto unlock;
> }
> cl_arr = *class_array;
--
Regards,
Laurent Pinchart
prev parent reply other threads:[~2016-07-16 12:36 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2016-07-16 7:04 [PATCH] usb: gadget: uvc: Fix return value in case of error Christophe JAILLET
2016-07-16 12:36 ` Laurent Pinchart [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=4105543.bTmzcC8hNY@avalon \
--to=laurent.pinchart@ideasonboard.com \
--cc=balbi@kernel.org \
--cc=christophe.jaillet@wanadoo.fr \
--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