[SCSI] zfcp: (cleanup) kmalloc/kzalloc replacement

Replace kmalloc/memset by kzalloc or kcalloc.

Signed-off-by: Andreas Herrmann <aherrman@de.ibm.com>
Signed-off-by: James Bottomley <James.Bottomley@SteelEye.com>
This commit is contained in:
Andreas Herrmann
2006-05-22 18:17:30 +02:00
committed by James Bottomley
parent ca3271b402
commit ec4081c6ba
3 changed files with 10 additions and 20 deletions

View File

@@ -761,10 +761,9 @@ zfcp_get_fc_host_stats(struct Scsi_Host *shost)
if (!fc_stats)
return NULL;
data = kmalloc(sizeof(*data), GFP_KERNEL);
data = kzalloc(sizeof(*data), GFP_KERNEL);
if (!data)
return NULL;
memset(data, 0, sizeof(*data));
ret = zfcp_fsf_exchange_port_data(NULL, adapter, data);
if (ret) {
@@ -792,10 +791,9 @@ zfcp_reset_fc_host_stats(struct Scsi_Host *shost)
int ret;
adapter = (struct zfcp_adapter *)shost->hostdata[0];
data = kmalloc(sizeof(*data), GFP_KERNEL);
data = kzalloc(sizeof(*data), GFP_KERNEL);
if (!data)
return;
memset(data, 0, sizeof(*data));
ret = zfcp_fsf_exchange_port_data(NULL, adapter, data);
if (ret == 0) {