diff options
author | Takashi Iwai <tiwai@suse.de> | 2019-02-04 16:32:09 +0100 |
---|---|---|
committer | Takashi Iwai <tiwai@suse.de> | 2019-02-06 10:29:09 +0100 |
commit | 5116b94af07a9775ed694562f354e931b2cc04d4 (patch) | |
tree | f3e8a2cd528c0f37f59fdaa07db6cf348d4a280d /sound/pci/rme9652 | |
parent | f32e5616005bb999fec6a2e914161805d7ad061f (diff) | |
download | lwn-5116b94af07a9775ed694562f354e931b2cc04d4.tar.gz lwn-5116b94af07a9775ed694562f354e931b2cc04d4.zip |
ALSA: pci: Drop superfluous PCM preallocation error checks
snd_pcm_lib_preallocate_pages() and co always succeed, so the error
check is simply redundant. Drop it.
Reviewed-by: Jaroslav Kysela <perex@perex.cz>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
Diffstat (limited to 'sound/pci/rme9652')
-rw-r--r-- | sound/pci/rme9652/hdspm.c | 20 |
1 files changed, 4 insertions, 16 deletions
diff --git a/sound/pci/rme9652/hdspm.c b/sound/pci/rme9652/hdspm.c index 679ad0415e3b..3e66df7b5d1f 100644 --- a/sound/pci/rme9652/hdspm.c +++ b/sound/pci/rme9652/hdspm.c @@ -6411,7 +6411,6 @@ static int snd_hdspm_create_hwdep(struct snd_card *card, ------------------------------------------------------------*/ static int snd_hdspm_preallocate_memory(struct hdspm *hdspm) { - int err; struct snd_pcm *pcm; size_t wanted; @@ -6419,21 +6418,10 @@ static int snd_hdspm_preallocate_memory(struct hdspm *hdspm) wanted = HDSPM_DMA_AREA_BYTES; - err = - snd_pcm_lib_preallocate_pages_for_all(pcm, - SNDRV_DMA_TYPE_DEV_SG, - snd_dma_pci_data(hdspm->pci), - wanted, - wanted); - if (err < 0) { - dev_dbg(hdspm->card->dev, - "Could not preallocate %zd Bytes\n", wanted); - - return err; - } else - dev_dbg(hdspm->card->dev, - " Preallocated %zd Bytes\n", wanted); - + snd_pcm_lib_preallocate_pages_for_all(pcm, SNDRV_DMA_TYPE_DEV_SG, + snd_dma_pci_data(hdspm->pci), + wanted, wanted); + dev_dbg(hdspm->card->dev, " Preallocated %zd Bytes\n", wanted); return 0; } |