summaryrefslogtreecommitdiffstats
path: root/sound/pci/fm801.c
diff options
context:
space:
mode:
authorLars-Peter Clausen2015-01-02 12:24:50 +0100
committerTakashi Iwai2015-01-02 16:33:03 +0100
commit483337f903dd39a10d4d6617cf6f30feeead061c (patch)
treea9914694bd1d26e468e2da652fe01c316680f7f1 /sound/pci/fm801.c
parentALSA: emu10k1: Remove always NULL parameters (diff)
downloadkernel-qcow2-linux-483337f903dd39a10d4d6617cf6f30feeead061c.tar.gz
kernel-qcow2-linux-483337f903dd39a10d4d6617cf6f30feeead061c.tar.xz
kernel-qcow2-linux-483337f903dd39a10d4d6617cf6f30feeead061c.zip
ALSA: fm801: Remove always NULL parameter
snd_fm801_pcm() takes a pointer to a pointer of a PCM where if this parameter is provided the newly allocated PCM is stored. All callers pass NULL though, so remove the parameter. This makes the code a bit cleaner and shorter. Signed-off-by: Lars-Peter Clausen <lars@metafoo.de> Signed-off-by: Takashi Iwai <tiwai@suse.de>
Diffstat (limited to 'sound/pci/fm801.c')
-rw-r--r--sound/pci/fm801.c14
1 files changed, 3 insertions, 11 deletions
diff --git a/sound/pci/fm801.c b/sound/pci/fm801.c
index d167afffce5f..9a2122fd3a8e 100644
--- a/sound/pci/fm801.c
+++ b/sound/pci/fm801.c
@@ -704,13 +704,11 @@ static struct snd_pcm_ops snd_fm801_capture_ops = {
.pointer = snd_fm801_capture_pointer,
};
-static int snd_fm801_pcm(struct fm801 *chip, int device, struct snd_pcm **rpcm)
+static int snd_fm801_pcm(struct fm801 *chip, int device)
{
struct snd_pcm *pcm;
int err;
- if (rpcm)
- *rpcm = NULL;
if ((err = snd_pcm_new(chip->card, "FM801", device, 1, 1, &pcm)) < 0)
return err;
@@ -726,16 +724,10 @@ static int snd_fm801_pcm(struct fm801 *chip, int device, struct snd_pcm **rpcm)
snd_dma_pci_data(chip->pci),
chip->multichannel ? 128*1024 : 64*1024, 128*1024);
- err = snd_pcm_add_chmap_ctls(pcm, SNDRV_PCM_STREAM_PLAYBACK,
+ return snd_pcm_add_chmap_ctls(pcm, SNDRV_PCM_STREAM_PLAYBACK,
snd_pcm_alt_chmaps,
chip->multichannel ? 6 : 2, 0,
NULL);
- if (err < 0)
- return err;
-
- if (rpcm)
- *rpcm = pcm;
- return 0;
}
/*
@@ -1340,7 +1332,7 @@ static int snd_card_fm801_probe(struct pci_dev *pci,
if (chip->tea575x_tuner & TUNER_ONLY)
goto __fm801_tuner_only;
- if ((err = snd_fm801_pcm(chip, 0, NULL)) < 0) {
+ if ((err = snd_fm801_pcm(chip, 0)) < 0) {
snd_card_free(card);
return err;
}