diff mbox series

scsi: megaraid: megaraid_sas: Remove unnecessary checks

Message ID 20231009151016.154039-1-artem.chernyshev@red-soft.ru
State New
Headers show
Series scsi: megaraid: megaraid_sas: Remove unnecessary checks | expand

Commit Message

Artem Chernyshev Oct. 9, 2023, 3:10 p.m. UTC
Since divisor checked before function call this if-statement
is never true

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

Signed-off-by: Artem Chernyshev <artem.chernyshev@red-soft.ru>
---
 drivers/scsi/megaraid/megaraid_sas_fp.c | 5 -----
 1 file changed, 5 deletions(-)
diff mbox series

Patch

diff --git a/drivers/scsi/megaraid/megaraid_sas_fp.c b/drivers/scsi/megaraid/megaraid_sas_fp.c
index b8b388a4e28f..4cfa98ce3923 100644
--- a/drivers/scsi/megaraid/megaraid_sas_fp.c
+++ b/drivers/scsi/megaraid/megaraid_sas_fp.c
@@ -72,8 +72,6 @@  u32 mega_mod64(u64 dividend, u32 divisor)
 	u64 d;
 	u32 remainder;
 
-	if (!divisor)
-		printk(KERN_ERR "megasas : DIVISOR is zero, in div fn\n");
 	d = dividend;
 	remainder = do_div(d, divisor);
 	return remainder;
@@ -90,9 +88,6 @@  static u64 mega_div64_32(uint64_t dividend, uint32_t divisor)
 {
 	u64 d = dividend;
 
-	if (!divisor)
-		printk(KERN_ERR "megasas : DIVISOR is zero in mod fn\n");
-
 	do_div(d, divisor);
 
 	return d;