Commit 50b9fa7
committed
media: adv7604: prevent underflow condition when reporting colorspace
Currently, adv76xx_log_status() reads some date using
io_read() which may return negative values. The current logic
doesn't check such errors, causing colorspace to be reported
on a wrong way at adv76xx_log_status(), as reported by Coverity.
If I/O error happens there, print a different message, instead
of reporting bogus messages to userspace.
Fixes: 54450f5 ("[media] adv7604: driver for the Analog Devices ADV7604 video decoder")
Signed-off-by: Mauro Carvalho Chehab <mchehab+huawei@kernel.org>
Reviewed-by: Hans Verkuil <hverkuil@xs4all.nl>1 parent 576a307 commit 50b9fa7
1 file changed
+17
-9
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
2519 | 2519 | | |
2520 | 2520 | | |
2521 | 2521 | | |
2522 | | - | |
| 2522 | + | |
| 2523 | + | |
2523 | 2524 | | |
2524 | 2525 | | |
2525 | | - | |
2526 | 2526 | | |
2527 | 2527 | | |
2528 | 2528 | | |
| |||
2621 | 2621 | | |
2622 | 2622 | | |
2623 | 2623 | | |
2624 | | - | |
2625 | | - | |
2626 | | - | |
2627 | | - | |
2628 | | - | |
2629 | | - | |
2630 | | - | |
| 2624 | + | |
| 2625 | + | |
| 2626 | + | |
| 2627 | + | |
| 2628 | + | |
| 2629 | + | |
| 2630 | + | |
| 2631 | + | |
| 2632 | + | |
| 2633 | + | |
| 2634 | + | |
| 2635 | + | |
| 2636 | + | |
| 2637 | + | |
| 2638 | + | |
2631 | 2639 | | |
2632 | 2640 | | |
2633 | 2641 | | |
| |||
0 commit comments