Start acquisition return code was not being checked. Return error
if start acquisition fails.
Signed-off-by: Dean Anderson <linux-dev@sensoray.com>
Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com>
Signed-off-by: Mauro Carvalho Chehab <m.chehab@samsung.com>
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;
}
dprintk(dev, 2, "start acquire exit[%d] %d\n", vc->idx, res);
mutex_unlock(&dev->cmdlock);
- return 0;
+ return res;
}
static int s2255_stop_acquire(struct s2255_vc *vc)