From: Hans de Goede <hdegoede@redhat.com>
To: Antonio Ospite <ospite@studenti.unina.it>, linux-media@vger.kernel.org
Cc: m.chehab@samsung.com, Julia Lawall <julia.lawall@lip6.fr>
Subject: Re: [PATCH 1/2] gspca_kinect: fix kinect_read() error path
Date: Sun, 23 Feb 2014 22:45:31 +0100 [thread overview]
Message-ID: <530A6BFB.8060001@redhat.com> (raw)
In-Reply-To: <1388421706-8366-1-git-send-email-ospite@studenti.unina.it>
Hi,
Thanks I've added both to my gspca tree for 3.15
Regards,
Hans
On 12/30/2013 05:41 PM, Antonio Ospite wrote:
> The error checking code relative to the invocations of kinect_read()
> does not return the actual return code of the function just called, it
> returns "res" which still contains the value of the last invocation of
> a previous kinect_write().
>
> Return the proper value, and while at it also report with -EREMOTEIO the
> case of a partial transfer.
>
> Reported-by: Julia Lawall <julia.lawall@lip6.fr>
> Signed-off-by: Antonio Ospite <ospite@studenti.unina.it>
> ---
> drivers/media/usb/gspca/kinect.c | 2 +-
> 1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/drivers/media/usb/gspca/kinect.c b/drivers/media/usb/gspca/kinect.c
> index 3773a8a..48084736 100644
> --- a/drivers/media/usb/gspca/kinect.c
> +++ b/drivers/media/usb/gspca/kinect.c
> @@ -158,7 +158,7 @@ static int send_cmd(struct gspca_dev *gspca_dev, uint16_t cmd, void *cmdbuf,
> PDEBUG(D_USBO, "Control reply: %d", res);
> if (actual_len < sizeof(*rhdr)) {
> pr_err("send_cmd: Input control transfer failed (%d)\n", res);
> - return res;
> + return actual_len < 0 ? actual_len : -EREMOTEIO;
> }
> actual_len -= sizeof(*rhdr);
>
>
next prev parent reply other threads:[~2014-02-23 21:45 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2013-12-25 19:00 question about drivers/media/usb/gspca/kinect.c Julia Lawall
2013-12-26 16:38 ` Fwd: " Hans de Goede
2013-12-30 15:56 ` Antonio Ospite
2013-12-30 16:41 ` [PATCH 1/2] gspca_kinect: fix kinect_read() error path Antonio Ospite
2014-02-23 21:45 ` Hans de Goede [this message]
2013-12-30 16:41 ` [PATCH 2/2] gspca_kinect: fix messages about kinect_read() return value Antonio Ospite
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=530A6BFB.8060001@redhat.com \
--to=hdegoede@redhat.com \
--cc=julia.lawall@lip6.fr \
--cc=linux-media@vger.kernel.org \
--cc=m.chehab@samsung.com \
--cc=ospite@studenti.unina.it \
/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.