The patch number 9277 was added via Jean-Francois Moine <[EMAIL PROTECTED]>
to http://linuxtv.org/hg/v4l-dvb master development tree.

Kernel patches in this development tree may be modified to be backward
compatible with older kernels. Compatibility modifications will be
removed before inclusion into the mainstream Kernel

If anyone has any objections, please let us know by sending a message to:
        [EMAIL PROTECTED]

------

From: Erik Andren  <[EMAIL PROTECTED]>
gspca: propagate an error in m5602_start_transfer()


Priority: normal

Signed-off-by: Erik Andren <[EMAIL PROTECTED]>
Signed-off-by: Jean-Francois Moine <[EMAIL PROTECTED]>


---

 linux/drivers/media/video/gspca/m5602/m5602_core.c |   10 ++++++----
 1 file changed, 6 insertions(+), 4 deletions(-)

diff -r 96f54ec13e19 -r ce8aee1074dc 
linux/drivers/media/video/gspca/m5602/m5602_core.c
--- a/linux/drivers/media/video/gspca/m5602/m5602_core.c        Wed Oct 15 
22:02:21 2008 -0200
+++ b/linux/drivers/media/video/gspca/m5602/m5602_core.c        Thu Oct 16 
21:36:35 2008 +0200
@@ -146,16 +146,18 @@ static int m5602_start_transfer(struct g
 {
        struct sd *sd = (struct sd *) gspca_dev;
        __u8 *buf = sd->gspca_dev.usb_buf;
+       int err;
 
        /* Send start command to the camera */
        const u8 buffer[4] = {0x13, 0xf9, 0x0f, 0x01};
        memcpy(buf, buffer, sizeof(buffer));
-       usb_control_msg(gspca_dev->dev, usb_sndctrlpipe(gspca_dev->dev, 0),
-                       0x04, 0x40, 0x19, 0x0000, buf,
-                       4, M5602_URB_MSG_TIMEOUT);
+       err = usb_control_msg(gspca_dev->dev,
+                             usb_sndctrlpipe(gspca_dev->dev, 0),
+                             0x04, 0x40, 0x19, 0x0000, buf,
+                             4, M5602_URB_MSG_TIMEOUT);
 
        PDEBUG(DBG_V4L2, "Transfer started");
-       return 0;
+       return (err < 0) ? err : 0;
 }
 
 static void m5602_urb_complete(struct gspca_dev *gspca_dev,


---

Patch is available at: 
http://linuxtv.org/hg/v4l-dvb/rev/ce8aee1074dc86f32386f4e55ea1d0eb33c4b0c9

_______________________________________________
linuxtv-commits mailing list
linuxtv-commits@linuxtv.org
http://www.linuxtv.org/cgi-bin/mailman/listinfo/linuxtv-commits

Reply via email to