scsi: aic79xx: Use kzalloc instead of kmalloc/memset
Subsystems (3)
PATCH 2/4 scsi: aic79xx: Use kzalloc instead of kmalloc/memset
Signed-off-by Daeseok Youn <[email protected]>
--- drivers/scsi/aic7xxx/aic79xx_core.c | 3 +-- 1 files changed, 1 insertions(+), 2 deletions(-)
drivers/scsi/aic7xxx/aic79xx_core.c +1 -2
@@ -10437,14 +10437,13 @@ ahd_handle_en_lun(struct ahd_softc *ahd, struct cam_sim *sim, union ccb *ccb)return ; } } - lstate =kmalloc (sizeof (*lstate),GFP_ATOMIC ); + lstate =kzalloc (sizeof (*lstate),GFP_ATOMIC );if (lstate =NULL ) {xpt_print_path (ccb->ccb_h.path);printk ("Couldn't allocate lstate\n" ); ccb->ccb_h.status =CAM_RESRC_UNAVAIL ;return ; } -memset (lstate,0 ,sizeof (*lstate)); status = xpt_create_path(&lstate->path, /*periph*/NULL, xpt_path_path_id(ccb->ccb_h.path), xpt_path_target_id(ccb->ccb_h.path),
Signature · 1 line
1.7.1