From: Swen Schillig Date: Wed, 18 Jul 2007 08:55:08 +0000 (+0200) Subject: [SCSI] zfcp: Replace kmalloc/memset with kzalloc X-Git-Url: https://git.stricted.de/?a=commitdiff_plain;h=0d661327a7578c3fca43db78f32e92a902237e7a;p=GitHub%2Fmoto-9609%2Fandroid_kernel_motorola_exynos9610.git [SCSI] zfcp: Replace kmalloc/memset with kzalloc Memory allocated with kmalloc is always initialzed to 0 with memset. Replace the two calls with kzalloc, that already does both steps. Signed-off-by: Swen Schillig Signed-off-by: James Bottomley --- diff --git a/drivers/s390/scsi/zfcp_erp.c b/drivers/s390/scsi/zfcp_erp.c index 4e7cb6dc4d34..d8cd75ce2d9a 100644 --- a/drivers/s390/scsi/zfcp_erp.c +++ b/drivers/s390/scsi/zfcp_erp.c @@ -1626,7 +1626,7 @@ zfcp_erp_schedule_work(struct zfcp_unit *unit) { struct zfcp_erp_add_work *p; - p = kmalloc(sizeof(*p), GFP_KERNEL); + p = kzalloc(sizeof(*p), GFP_KERNEL); if (!p) { ZFCP_LOG_NORMAL("error: Out of resources. Could not register " "the FCP-LUN 0x%Lx connected to " @@ -1639,7 +1639,6 @@ zfcp_erp_schedule_work(struct zfcp_unit *unit) } zfcp_unit_get(unit); - memset(p, 0, sizeof(*p)); atomic_set_mask(ZFCP_STATUS_UNIT_SCSI_WORK_PENDING, &unit->status); INIT_WORK(&p->work, zfcp_erp_scsi_scan); p->unit = unit;