]> git.baikalelectronics.ru Git - kernel.git/commitdiff
scsi: qla4xxx: Drop redundant memset()
authorHaowen Bai <baihaowen@meizu.com>
Thu, 21 Apr 2022 09:24:50 +0000 (17:24 +0800)
committerMartin K. Petersen <martin.petersen@oracle.com>
Tue, 26 Apr 2022 03:33:36 +0000 (23:33 -0400)
The region set by the call to memset() is immediately overwritten by the
subsequent call to memcpy(). Drop redundant memset().

Link: https://lore.kernel.org/r/1650533091-28815-1-git-send-email-baihaowen@meizu.com
Signed-off-by: Haowen Bai <baihaowen@meizu.com>
Signed-off-by: Martin K. Petersen <martin.petersen@oracle.com>
drivers/scsi/qla4xxx/ql4_os.c

index 3f6cb2a5c2c28bcad03be2a3d400fc7a83470093..9e849f6b0d0f7df2c0685f1b12e2f63b36596cd7 100644 (file)
@@ -671,7 +671,6 @@ static void qla4xxx_create_chap_list(struct scsi_qla_host *ha)
                goto exit_chap_list;
        }
 
-       memset(ha->chap_list, 0, chap_size);
        memcpy(ha->chap_list, chap_flash_data, chap_size);
 
 exit_chap_list: