[SCSI] hpsa: use kzalloc not kmalloc plus memset
authorStephen M. Cameron <scameron@beardog.cce.hp.com>
Thu, 4 Feb 2010 14:42:09 +0000 (08:42 -0600)
committerJames Bottomley <James.Bottomley@suse.de>
Wed, 17 Feb 2010 19:18:53 +0000 (13:18 -0600)
Signed-off-by: Stephen M. Cameron <scameron@beardog.cce.hp.com>
Signed-off-by: James Bottomley <James.Bottomley@suse.de>
drivers/scsi/hpsa.c

index add2ed578466ace899f46bd3a08f08c107963dee..bd081fedc3a719a01fd6a14c91a59c68b582ed7e 100644 (file)
@@ -1405,13 +1405,12 @@ static int hpsa_update_device_info(struct ctlr_info *h,
        unsigned char scsi3addr[], struct hpsa_scsi_dev_t *this_device)
 {
 #define OBDR_TAPE_INQ_SIZE 49
-       unsigned char *inq_buff = NULL;
+       unsigned char *inq_buff;
 
-       inq_buff = kmalloc(OBDR_TAPE_INQ_SIZE, GFP_KERNEL);
+       inq_buff = kzalloc(OBDR_TAPE_INQ_SIZE, GFP_KERNEL);
        if (!inq_buff)
                goto bail_out;
 
-       memset(inq_buff, 0, OBDR_TAPE_INQ_SIZE);
        /* Do an inquiry to the device to see what it is. */
        if (hpsa_scsi_do_inquiry(h, scsi3addr, 0, inq_buff,
                (unsigned char) OBDR_TAPE_INQ_SIZE) != 0) {