@@ -262,11 +262,10 @@ static int efct_debugfs_session_open(str
return EFC_SUCCESS;
}
- filp->private_data = kmalloc(size, GFP_KERNEL);
+ filp->private_data = kzalloc(size, GFP_KERNEL);
if (!filp->private_data)
return -ENOMEM;
- memset(filp->private_data, 0, size);
efct_lio_tgt_session_data(sport->efct, sport->wwpn, filp->private_data,
size);
return EFC_SUCCESS;
@@ -300,11 +299,10 @@ static int efct_npiv_debugfs_session_ope
return EFC_SUCCESS;
}
- filp->private_data = kmalloc(size, GFP_KERNEL);
+ filp->private_data = kzalloc(size, GFP_KERNEL);
if (!filp->private_data)
return -ENOMEM;
- memset(filp->private_data, 0, size);
efct_lio_tgt_session_data(sport->efct, sport->npiv_wwpn,
filp->private_data, size);
return EFC_SUCCESS;
@@ -1459,11 +1457,10 @@ int efct_scsi_del_initiator(struct efc *
if (reason == EFCT_SCSI_INITIATOR_MISSING)
return EFCT_SCSI_CALL_COMPLETE;
- wq_data = kmalloc(sizeof(*wq_data), GFP_ATOMIC);
+ wq_data = kzalloc(sizeof(*wq_data), GFP_ATOMIC);
if (!wq_data)
return EFCT_SCSI_CALL_COMPLETE;
- memset(wq_data, 0, sizeof(*wq_data));
wq_data->ptr = node;
wq_data->efct = efct;
INIT_WORK(&wq_data->work, efct_lio_remove_session);