summaryrefslogtreecommitdiff
path: root/linux/drivers/media/video/gspca
diff options
context:
space:
mode:
authorJean-Francois Moine <moinejf@free.fr>2008-10-16 21:36:35 +0200
committerJean-Francois Moine <moinejf@free.fr>2008-10-16 21:36:35 +0200
commit1535084d31c324bd91936463587809c19548ea90 (patch)
tree45dd686e0d30d5bdcb9546aa586fad288ea48fe9 /linux/drivers/media/video/gspca
parent4955fc93620d44b79e1f67d2fe79ab69908a899e (diff)
downloadmediapointer-dvb-s2-1535084d31c324bd91936463587809c19548ea90.tar.gz
mediapointer-dvb-s2-1535084d31c324bd91936463587809c19548ea90.tar.bz2
gspca: propagate an error in m5602_start_transfer()
From: Erik Andren <erik.andren@gmail.com> Priority: normal Signed-off-by: Erik Andren <erik.andren@gmail.com> Signed-off-by: Jean-Francois Moine <moinejf@free.fr>
Diffstat (limited to 'linux/drivers/media/video/gspca')
-rw-r--r--linux/drivers/media/video/gspca/m5602/m5602_core.c10
1 files changed, 6 insertions, 4 deletions
diff --git a/linux/drivers/media/video/gspca/m5602/m5602_core.c b/linux/drivers/media/video/gspca/m5602/m5602_core.c
index 19d5e351c..a7021fcec 100644
--- a/linux/drivers/media/video/gspca/m5602/m5602_core.c
+++ b/linux/drivers/media/video/gspca/m5602/m5602_core.c
@@ -146,16 +146,18 @@ static int m5602_start_transfer(struct gspca_dev *gspca_dev)
{
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,