* [PATCH] s2255drv: fix for return code not checked
@ 2014-02-05 18:54 Dean Anderson
0 siblings, 0 replies; only message in thread
From: Dean Anderson @ 2014-02-05 18:54 UTC (permalink / raw)
To: hverkuil, linux-dev, linux-media
Start acquisition return code was not being checked. Return error
if start acquisition fails.
Signed-off-by: Dean Anderson <linux-dev@sensoray.com>
---
drivers/media/usb/s2255/s2255drv.c | 14 +++++++++-----
1 file changed, 9 insertions(+), 5 deletions(-)
diff --git a/drivers/media/usb/s2255/s2255drv.c b/drivers/media/usb/s2255/s2255drv.c
index 4c483ad..556e5e5 100644
--- a/drivers/media/usb/s2255/s2255drv.c
+++ b/drivers/media/usb/s2255/s2255drv.c
@@ -1230,12 +1230,16 @@ static int vidioc_streamon(struct file *file, void *priv, enum v4l2_buf_type i)
vc->buffer.frame[j].cur_size = 0;
}
res = videobuf_streamon(&fh->vb_vidq);
- if (res == 0) {
- s2255_start_acquire(vc);
- vc->b_acquire = 1;
- } else
+ if (res != 0) {
res_free(fh);
-
+ return res;
+ }
+ res = s2255_start_acquire(vc);
+ if (res != 0) {
+ res_free(fh);
+ return res;
+ }
+ vc->b_acquire = 1;
return res;
}
--
1.7.9.5
^ permalink raw reply related [flat|nested] only message in thread
only message in thread, other threads:[~2014-02-05 18:54 UTC | newest]
Thread overview: (only message) (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2014-02-05 18:54 [PATCH] s2255drv: fix for return code not checked Dean Anderson
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox