memcpy operation is next to memset code, and the size to copy is equals to the size to memset, so the memset operation is unnecessary, remove it. Signed-off-by: Zheng Yongjun <zhengyongjun3@xxxxxxxxxx> --- drivers/scsi/bfa/bfa_ioc.c | 1 - 1 file changed, 1 deletion(-) diff --git a/drivers/scsi/bfa/bfa_ioc.c b/drivers/scsi/bfa/bfa_ioc.c index 325ad8a592bb..8d808ca2ec20 100644 --- a/drivers/scsi/bfa/bfa_ioc.c +++ b/drivers/scsi/bfa/bfa_ioc.c @@ -2748,7 +2748,6 @@ bfa_ioc_get_type(struct bfa_ioc_s *ioc) void bfa_ioc_get_adapter_serial_num(struct bfa_ioc_s *ioc, char *serial_num) { - memset((void *)serial_num, 0, BFA_ADAPTER_SERIAL_NUM_LEN); memcpy((void *)serial_num, (void *)ioc->attr->brcd_serialnum, BFA_ADAPTER_SERIAL_NUM_LEN); -- 2.22.0