From: Dean Anderson <linux-dev@sensoray.com>
To: hverkuil@xs4all.nl, linux-dev@sensoray.com, linux-media@vger.kernel.org
Subject: [PATCH] s2255drv: fix for return code not checked
Date: Wed, 5 Feb 2014 10:54:49 -0800 [thread overview]
Message-ID: <1391626489-4441-1-git-send-email-linux-dev@sensoray.com> (raw)
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
reply other threads:[~2014-02-05 18:54 UTC|newest]
Thread overview: [no followups] expand[flat|nested] mbox.gz Atom feed
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=1391626489-4441-1-git-send-email-linux-dev@sensoray.com \
--to=linux-dev@sensoray.com \
--cc=hverkuil@xs4all.nl \
--cc=linux-media@vger.kernel.org \
/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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox