lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [day] [month] [year] [list]
Message-Id: <20231018124411.583718-1-artem.chernyshev@red-soft.ru>
Date:   Wed, 18 Oct 2023 15:44:11 +0300
From:   Artem Chernyshev <artem.chernyshev@...-soft.ru>
To:     Mauro Carvalho Chehab <mchehab@...nel.org>
Cc:     Artem Chernyshev <artem.chernyshev@...-soft.ru>,
        Hans Verkuil <hverkuil-cisco@...all.nl>,
        Luis Chamberlain <mcgrof@...nel.org>,
        Jonathan Neuschäfer <j.neuschaefer@....net>,
        linux-media@...r.kernel.org, linux-kernel@...r.kernel.org,
        lvc-project@...uxtesting.org
Subject: [PATCH] media: dvb: check return value in drxj_dap_atomic_read_write_block()

Check return value of drxj_dap_write_reg16()

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

Signed-off-by: Artem Chernyshev <artem.chernyshev@...-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

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ