[<prev] [next>] [day] [month] [year] [list]
Message-Id: <20221118111523.123463-1-arefev@swemel.ru>
Date: Fri, 18 Nov 2022 14:15:23 +0300
From: Denis Arefev <arefev@...mel.ru>
To: Greg Kroah-Hartman <gregkh@...uxfoundation.org>
Cc: devel@...verdev.osuosl.org, linux-kernel@...r.kernel.org,
lvc-project@...uxtesting.org, trufanov@...mel.ru, vfh@...mel.ru
Subject: [PATCH] staging: rts5208: Added value check
Added value check.
Return value of a function 'ms_set_rw_reg_addr'
called at ms.c:1770 is not checked,
but it is usually checked for this function
Found by Linux Verification Center (linuxtesting.org) with SVACE.
Signed-off-by: Denis Arefev <arefev@...mel.ru>
---
drivers/staging/rts5208/ms.c | 2 ++
1 file changed, 2 insertions(+)
diff --git a/drivers/staging/rts5208/ms.c b/drivers/staging/rts5208/ms.c
index 9001570a8c94..e884ee5da317 100644
--- a/drivers/staging/rts5208/ms.c
+++ b/drivers/staging/rts5208/ms.c
@@ -1769,6 +1769,8 @@ static int ms_copy_page(struct rtsx_chip *chip, u16 old_blk, u16 new_blk,
retval = ms_set_rw_reg_addr(chip, OVERWRITE_FLAG, MS_EXTRA_SIZE,
SYSTEM_PARAM, (6 + MS_EXTRA_SIZE));
+ if (retval != STATUS_SUCCESS)
+ return STATUS_FAIL;
ms_set_err_code(chip, MS_NO_ERROR);
--
2.25.1
Powered by blists - more mailing lists