diff options
author | Lars-Peter Clausen <lars@metafoo.de> | 2015-01-02 12:24:44 +0100 |
---|---|---|
committer | Takashi Iwai <tiwai@suse.de> | 2015-01-02 16:31:04 +0100 |
commit | a08800940f72bb5502a8b6afb675231cef0b3a62 (patch) | |
tree | 33776a4ca6dfd5274a3c7116b876192b3c4f74fe /sound/pci/ad1889.c | |
parent | ALSA: wss: Remove (almost) always NULL parameters (diff) | |
download | linux-a08800940f72bb5502a8b6afb675231cef0b3a62.tar.xz linux-a08800940f72bb5502a8b6afb675231cef0b3a62.zip |
ASLA: ad1889: Remove always NULL parameter
snd_ad1889_pcm_init() 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/ad1889.c')
-rw-r--r-- | sound/pci/ad1889.c | 10 |
1 files changed, 2 insertions, 8 deletions
diff --git a/sound/pci/ad1889.c b/sound/pci/ad1889.c index 1610c38337af..547ee30540a0 100644 --- a/sound/pci/ad1889.c +++ b/sound/pci/ad1889.c @@ -623,14 +623,11 @@ snd_ad1889_interrupt(int irq, void *dev_id) } static int -snd_ad1889_pcm_init(struct snd_ad1889 *chip, int device, struct snd_pcm **rpcm) +snd_ad1889_pcm_init(struct snd_ad1889 *chip, int device) { int err; struct snd_pcm *pcm; - if (rpcm) - *rpcm = NULL; - err = snd_pcm_new(chip->card, chip->card->driver, device, 1, 1, &pcm); if (err < 0) return err; @@ -658,9 +655,6 @@ snd_ad1889_pcm_init(struct snd_ad1889 *chip, int device, struct snd_pcm **rpcm) return err; } - if (rpcm) - *rpcm = pcm; - return 0; } @@ -1016,7 +1010,7 @@ snd_ad1889_probe(struct pci_dev *pci, if (err < 0) goto free_and_ret; - err = snd_ad1889_pcm_init(chip, 0, NULL); + err = snd_ad1889_pcm_init(chip, 0); if (err < 0) goto free_and_ret; |