diff options
-rw-r--r-- | sound/pci/asihpi/hpi6000.c | 3 | ||||
-rw-r--r-- | sound/pci/asihpi/hpi6205.c | 3 |
2 files changed, 2 insertions, 4 deletions
diff --git a/sound/pci/asihpi/hpi6000.c b/sound/pci/asihpi/hpi6000.c index 9c50931731a5..839ecb2e4b64 100644 --- a/sound/pci/asihpi/hpi6000.c +++ b/sound/pci/asihpi/hpi6000.c | |||
@@ -448,14 +448,13 @@ static void subsys_create_adapter(struct hpi_message *phm, | |||
448 | if (phm->u.s.resource.r.pci->device_id != HPI_PCI_DEV_ID_PCI2040) | 448 | if (phm->u.s.resource.r.pci->device_id != HPI_PCI_DEV_ID_PCI2040) |
449 | return; | 449 | return; |
450 | 450 | ||
451 | ao.priv = kmalloc(sizeof(struct hpi_hw_obj), GFP_KERNEL); | 451 | ao.priv = kzalloc(sizeof(struct hpi_hw_obj), GFP_KERNEL); |
452 | if (!ao.priv) { | 452 | if (!ao.priv) { |
453 | HPI_DEBUG_LOG(ERROR, "cant get mem for adapter object\n"); | 453 | HPI_DEBUG_LOG(ERROR, "cant get mem for adapter object\n"); |
454 | phr->error = HPI_ERROR_MEMORY_ALLOC; | 454 | phr->error = HPI_ERROR_MEMORY_ALLOC; |
455 | return; | 455 | return; |
456 | } | 456 | } |
457 | 457 | ||
458 | memset(ao.priv, 0, sizeof(struct hpi_hw_obj)); | ||
459 | /* create the adapter object based on the resource information */ | 458 | /* create the adapter object based on the resource information */ |
460 | /*? memcpy(&ao.Pci,&phm->u.s.Resource.r.Pci,sizeof(ao.Pci)); */ | 459 | /*? memcpy(&ao.Pci,&phm->u.s.Resource.r.Pci,sizeof(ao.Pci)); */ |
461 | ao.pci = *phm->u.s.resource.r.pci; | 460 | ao.pci = *phm->u.s.resource.r.pci; |
diff --git a/sound/pci/asihpi/hpi6205.c b/sound/pci/asihpi/hpi6205.c index 8df2ff76d944..5e88c1fc2b9e 100644 --- a/sound/pci/asihpi/hpi6205.c +++ b/sound/pci/asihpi/hpi6205.c | |||
@@ -482,13 +482,12 @@ static void subsys_create_adapter(struct hpi_message *phm, | |||
482 | if (phm->u.s.resource.r.pci->device_id != HPI_PCI_DEV_ID_DSP6205) | 482 | if (phm->u.s.resource.r.pci->device_id != HPI_PCI_DEV_ID_DSP6205) |
483 | return; | 483 | return; |
484 | 484 | ||
485 | ao.priv = kmalloc(sizeof(struct hpi_hw_obj), GFP_KERNEL); | 485 | ao.priv = kzalloc(sizeof(struct hpi_hw_obj), GFP_KERNEL); |
486 | if (!ao.priv) { | 486 | if (!ao.priv) { |
487 | HPI_DEBUG_LOG(ERROR, "cant get mem for adapter object\n"); | 487 | HPI_DEBUG_LOG(ERROR, "cant get mem for adapter object\n"); |
488 | phr->error = HPI_ERROR_MEMORY_ALLOC; | 488 | phr->error = HPI_ERROR_MEMORY_ALLOC; |
489 | return; | 489 | return; |
490 | } | 490 | } |
491 | memset(ao.priv, 0, sizeof(struct hpi_hw_obj)); | ||
492 | 491 | ||
493 | ao.pci = *phm->u.s.resource.r.pci; | 492 | ao.pci = *phm->u.s.resource.r.pci; |
494 | err = create_adapter_obj(&ao, &os_error_code); | 493 | err = create_adapter_obj(&ao, &os_error_code); |