[PATCH] media: ov5640: fix spurious streamon failures

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Time to time, stream on is failing with a strange positive error.
Error code is returned erroneously by ov5640_set_ctrl_exposure()
due to ov5640_get_vts() return value wrongly treated as error.
Fix this by forcing ret to 0 after ov5640_get_vts() success call,
in order that ret is set to success for rest of code sequence.

Signed-off-by: Hugues Fruchet <hugues.fruchet@xxxxxx>
---
 drivers/media/i2c/ov5640.c | 1 +
 1 file changed, 1 insertion(+)

diff --git a/drivers/media/i2c/ov5640.c b/drivers/media/i2c/ov5640.c
index f017742..e2dd352 100644
--- a/drivers/media/i2c/ov5640.c
+++ b/drivers/media/i2c/ov5640.c
@@ -2057,6 +2057,7 @@ static int ov5640_set_ctrl_exposure(struct ov5640_dev *sensor, int exp)
 		if (ret < 0)
 			return ret;
 		max_exp += ret;
+		ret = 0;
 
 		if (ctrls->exposure->val < max_exp)
 			ret = ov5640_set_exposure(sensor, ctrls->exposure->val);
-- 
1.9.1




[Index of Archives]     [Linux Input]     [Video for Linux]     [Gstreamer Embedded]     [Mplayer Users]     [Linux USB Devel]     [Linux Audio Users]     [Linux Kernel]     [Linux SCSI]     [Yosemite Backpacking]
  Powered by Linux