[lvc-project] [PATCH] media: dvb: check return value in drxj_dap_atomic_read_write_block()
Artem Chernyshev
artem.chernyshev at red-soft.ru
Wed Oct 18 15:44:11 MSK 2023
Check return value of drxj_dap_write_reg16()
Found by Linux Verification Center (linuxtesting.org) with SVACE.
Signed-off-by: Artem Chernyshev <artem.chernyshev at red-soft.ru>
---
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
More information about the lvc-project
mailing list