Linux Media Controller development
 help / color / mirror / Atom feed
From: Tuukka Toivonen <tuukka.toivonen@intel.com>
To: linux-media@vger.kernel.org
Cc: laurent.pinchart@ideasonboard.com
Subject: [yavta PATCH v2] Return proper error code if STREAMON fails
Date: Mon, 14 Dec 2015 09:49:57 +0200	[thread overview]
Message-ID: <1737708.1znbc4YfP6@ttoivone-desk1> (raw)
In-Reply-To: <181264909.M62ZDuucnX@ttoivone-desk1>

Return the error code if video_enable() and VIDIOC_STREAMON
fails.

Signed-off-by: Tuukka Toivonen <tuukka.toivonen@intel.com>
---
 yavta.c | 4 +++-
 1 file changed, 3 insertions(+), 1 deletion(-)

diff --git a/yavta.c b/yavta.c
index b627725..3d80d3c 100644
--- a/yavta.c
+++ b/yavta.c
@@ -1708,7 +1708,9 @@ static int video_do_capture(struct device *dev, unsigned int nframes,
 	}
 
 	/* Stop streaming. */
-	video_enable(dev, 0);
+	ret = video_enable(dev, 0);
+	if (ret < 0)
+		return ret;
 
 	if (nframes == 0) {
 		printf("No frames captured.\n");
-- 
1.9.1


  reply	other threads:[~2015-12-14  7:50 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-11-30 14:46 [yavta PATCH] Return proper error code if STREAMON fails Tuukka Toivonen
2015-12-12 15:40 ` Laurent Pinchart
2015-12-14  7:16   ` Tuukka Toivonen
2015-12-14  7:49     ` Tuukka Toivonen [this message]
2015-12-14 18:40       ` [yavta PATCH v2] " Laurent Pinchart

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=1737708.1znbc4YfP6@ttoivone-desk1 \
    --to=tuukka.toivonen@intel.com \
    --cc=laurent.pinchart@ideasonboard.com \
    --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