[PATCH] media: dvb: check return value in drxj_dap_atomic_read_write_block()

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

 



Check return value of drxj_dap_write_reg16()

Found by Linux Verification Center (linuxtesting.org) with SVACE.

Signed-off-by: Artem Chernyshev <artem.chernyshev@xxxxxxxxxxx>
---
 drivers/media/dvb-frontends/drx39xyj/drxj.c | 10 +++++++---
 1 file changed, 7 insertions(+), 3 deletions(-)

diff --git a/drivers/media/dvb-frontends/drx39xyj/drxj.c b/drivers/media/dvb-frontends/drx39xyj/drxj.c
index a738573c8cd7..e657bb6dfa76 100644
--- a/drivers/media/dvb-frontends/drx39xyj/drxj.c
+++ b/drivers/media/dvb-frontends/drx39xyj/drxj.c
@@ -2136,9 +2136,13 @@ int drxj_dap_atomic_read_write_block(struct i2c_device_addr *dev_addr,
 
 			word = ((u16) data[2 * i]);
 			word += (((u16) data[(2 * i) + 1]) << 8);
-			drxj_dap_write_reg16(dev_addr,
-					     (DRXJ_HI_ATOMIC_BUF_START + i),
-					    word, 0);
+			rc = drxj_dap_write_reg16(dev_addr,
+						 (DRXJ_HI_ATOMIC_BUF_START + i),
+						  word, 0);
+			if (rc < 0) {
+				pr_err("error %d\n", rc);
+				goto rw_error;
+			}
 		}
 	}
 
-- 
2.37.3




[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