aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/ieee1394/sbp2.c
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/ieee1394/sbp2.c')
-rw-r--r--drivers/ieee1394/sbp2.c7
1 files changed, 2 insertions, 5 deletions
diff --git a/drivers/ieee1394/sbp2.c b/drivers/ieee1394/sbp2.c
index b871116fa4d1..84875cd5a70d 100644
--- a/drivers/ieee1394/sbp2.c
+++ b/drivers/ieee1394/sbp2.c
@@ -411,14 +411,12 @@ static int sbp2util_create_command_orb_pool(struct scsi_id_instance_data *scsi_i
411 411
412 spin_lock_irqsave(&scsi_id->sbp2_command_orb_lock, flags); 412 spin_lock_irqsave(&scsi_id->sbp2_command_orb_lock, flags);
413 for (i = 0; i < orbs; i++) { 413 for (i = 0; i < orbs; i++) {
414 command = (struct sbp2_command_info *) 414 command = kzalloc(sizeof(*command), GFP_ATOMIC);
415 kmalloc(sizeof(struct sbp2_command_info), GFP_ATOMIC);
416 if (!command) { 415 if (!command) {
417 spin_unlock_irqrestore(&scsi_id->sbp2_command_orb_lock, 416 spin_unlock_irqrestore(&scsi_id->sbp2_command_orb_lock,
418 flags); 417 flags);
419 return -ENOMEM; 418 return -ENOMEM;
420 } 419 }
421 memset(command, '\0', sizeof(struct sbp2_command_info));
422 command->command_orb_dma = 420 command->command_orb_dma =
423 pci_map_single(hi->host->pdev, &command->command_orb, 421 pci_map_single(hi->host->pdev, &command->command_orb,
424 sizeof(struct sbp2_command_orb), 422 sizeof(struct sbp2_command_orb),
@@ -714,12 +712,11 @@ static struct scsi_id_instance_data *sbp2_alloc_device(struct unit_directory *ud
714 712
715 SBP2_DEBUG("sbp2_alloc_device"); 713 SBP2_DEBUG("sbp2_alloc_device");
716 714
717 scsi_id = kmalloc(sizeof(*scsi_id), GFP_KERNEL); 715 scsi_id = kzalloc(sizeof(*scsi_id), GFP_KERNEL);
718 if (!scsi_id) { 716 if (!scsi_id) {
719 SBP2_ERR("failed to create scsi_id"); 717 SBP2_ERR("failed to create scsi_id");
720 goto failed_alloc; 718 goto failed_alloc;
721 } 719 }
722 memset(scsi_id, 0, sizeof(*scsi_id));
723 720
724 scsi_id->ne = ud->ne; 721 scsi_id->ne = ud->ne;
725 scsi_id->ud = ud; 722 scsi_id->ud = ud;