Cc: Hannes Reinecke <h...@suse.de>
Cc: "James E.J. Bottomley" <jbottom...@parallels.com>
Cc: linux-scsi@vger.kernel.org
Signed-off-by: Fabian Frederick <f...@skynet.be>
---
 drivers/scsi/aic7xxx/aic79xx_core.c | 3 +--
 drivers/scsi/aic7xxx/aic79xx_osm.c  | 3 +--
 2 files changed, 2 insertions(+), 4 deletions(-)

diff --git a/drivers/scsi/aic7xxx/aic79xx_core.c 
b/drivers/scsi/aic7xxx/aic79xx_core.c
index 0bcacf7..9ce383c 100644
--- a/drivers/scsi/aic7xxx/aic79xx_core.c
+++ b/drivers/scsi/aic7xxx/aic79xx_core.c
@@ -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),
diff --git a/drivers/scsi/aic7xxx/aic79xx_osm.c 
b/drivers/scsi/aic7xxx/aic79xx_osm.c
index 69d5c43..76b5fec 100644
--- a/drivers/scsi/aic7xxx/aic79xx_osm.c
+++ b/drivers/scsi/aic7xxx/aic79xx_osm.c
@@ -1325,10 +1325,9 @@ int
 ahd_platform_alloc(struct ahd_softc *ahd, void *platform_arg)
 {
        ahd->platform_data =
-           kmalloc(sizeof(struct ahd_platform_data), GFP_ATOMIC);
+           kzalloc(sizeof(struct ahd_platform_data), GFP_ATOMIC);
        if (ahd->platform_data == NULL)
                return (ENOMEM);
-       memset(ahd->platform_data, 0, sizeof(struct ahd_platform_data));
        ahd->platform_data->irq = AHD_LINUX_NOIRQ;
        ahd_lockinit(ahd);
        ahd->seltime = (aic79xx_seltime & 0x3) << 4;
-- 
1.9.1

--
To unsubscribe from this list: send the line "unsubscribe linux-scsi" in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html

Reply via email to