diff options
author | Markus Elfring <elfring@users.sourceforge.net> | 2017-08-12 13:20:16 +0200 |
---|---|---|
committer | Takashi Iwai <tiwai@suse.de> | 2017-08-12 23:25:40 +0200 |
commit | aef7758ff4ffcf9d7a03779f877228871efae4c0 (patch) | |
tree | 99e384a17199034036a0c1ad2234efa424c69cb1 /sound | |
parent | b26113fa6ab5f78438c2918b333e0f1c78a471d5 (diff) | |
download | linux-aef7758ff4ffcf9d7a03779f877228871efae4c0.tar.gz linux-aef7758ff4ffcf9d7a03779f877228871efae4c0.tar.bz2 linux-aef7758ff4ffcf9d7a03779f877228871efae4c0.zip |
ALSA: trident: Delete an error message for a failed memory allocation in snd_trident_tlb_alloc()
Omit an extra message for a memory allocation failure in this function.
This issue was detected by using the Coccinelle software.
Signed-off-by: Markus Elfring <elfring@users.sourceforge.net>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
Diffstat (limited to 'sound')
-rw-r--r-- | sound/pci/trident/trident_main.c | 6 |
1 files changed, 2 insertions, 4 deletions
diff --git a/sound/pci/trident/trident_main.c b/sound/pci/trident/trident_main.c index 4561040520c2..d9bb6dd9f227 100644 --- a/sound/pci/trident/trident_main.c +++ b/sound/pci/trident/trident_main.c @@ -3363,11 +3363,9 @@ static int snd_trident_tlb_alloc(struct snd_trident *trident) trident->tlb.entries_dmaaddr = ALIGN(trident->tlb.buffer.addr, SNDRV_TRIDENT_MAX_PAGES * 4); /* allocate shadow TLB page table (virtual addresses) */ trident->tlb.shadow_entries = vmalloc(SNDRV_TRIDENT_MAX_PAGES*sizeof(unsigned long)); - if (trident->tlb.shadow_entries == NULL) { - dev_err(trident->card->dev, - "unable to allocate shadow TLB entries\n"); + if (!trident->tlb.shadow_entries) return -ENOMEM; - } + /* allocate and setup silent page and initialise TLB entries */ if (snd_dma_alloc_pages(SNDRV_DMA_TYPE_DEV, snd_dma_pci_data(trident->pci), SNDRV_TRIDENT_PAGE_SIZE, &trident->tlb.silent_page) < 0) { |