diff options
author | Erik Andren <erik.andren@gmail.com> | 2008-10-16 15:36:35 -0400 |
---|---|---|
committer | Mauro Carvalho Chehab <mchehab@redhat.com> | 2008-10-17 16:39:22 -0400 |
commit | 588dbbb520e454260fa6bd283ac77fe4678c1c38 (patch) | |
tree | d9ddcba19eded627ee43a4a772473238554a3cc0 /drivers/media | |
parent | dcadd0826fce17e77cd6260569cbb3dd681c868c (diff) |
V4L/DVB (9277): gspca: propagate an error in m5602_start_transfer()
Signed-off-by: Erik Andren <erik.andren@gmail.com>
Signed-off-by: Jean-Francois Moine <moinejf@free.fr>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
Diffstat (limited to 'drivers/media')
-rw-r--r-- | drivers/media/video/gspca/m5602/m5602_core.c | 10 |
1 files changed, 6 insertions, 4 deletions
diff --git a/drivers/media/video/gspca/m5602/m5602_core.c b/drivers/media/video/gspca/m5602/m5602_core.c index 19d5e351ccc1..a7021fcec2bf 100644 --- a/drivers/media/video/gspca/m5602/m5602_core.c +++ b/drivers/media/video/gspca/m5602/m5602_core.c | |||
@@ -146,16 +146,18 @@ static int m5602_start_transfer(struct gspca_dev *gspca_dev) | |||
146 | { | 146 | { |
147 | struct sd *sd = (struct sd *) gspca_dev; | 147 | struct sd *sd = (struct sd *) gspca_dev; |
148 | __u8 *buf = sd->gspca_dev.usb_buf; | 148 | __u8 *buf = sd->gspca_dev.usb_buf; |
149 | int err; | ||
149 | 150 | ||
150 | /* Send start command to the camera */ | 151 | /* Send start command to the camera */ |
151 | const u8 buffer[4] = {0x13, 0xf9, 0x0f, 0x01}; | 152 | const u8 buffer[4] = {0x13, 0xf9, 0x0f, 0x01}; |
152 | memcpy(buf, buffer, sizeof(buffer)); | 153 | memcpy(buf, buffer, sizeof(buffer)); |
153 | usb_control_msg(gspca_dev->dev, usb_sndctrlpipe(gspca_dev->dev, 0), | 154 | err = usb_control_msg(gspca_dev->dev, |
154 | 0x04, 0x40, 0x19, 0x0000, buf, | 155 | usb_sndctrlpipe(gspca_dev->dev, 0), |
155 | 4, M5602_URB_MSG_TIMEOUT); | 156 | 0x04, 0x40, 0x19, 0x0000, buf, |
157 | 4, M5602_URB_MSG_TIMEOUT); | ||
156 | 158 | ||
157 | PDEBUG(DBG_V4L2, "Transfer started"); | 159 | PDEBUG(DBG_V4L2, "Transfer started"); |
158 | return 0; | 160 | return (err < 0) ? err : 0; |
159 | } | 161 | } |
160 | 162 | ||
161 | static void m5602_urb_complete(struct gspca_dev *gspca_dev, | 163 | static void m5602_urb_complete(struct gspca_dev *gspca_dev, |