Skip to content

Commit

Permalink
ALSA: ml403-ac97cr: Remove always NULL parameter
Browse files Browse the repository at this point in the history
snd_ml403_ac97cr_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 <[email protected]>
Signed-off-by: Takashi Iwai <[email protected]>
  • Loading branch information
larsclausen authored and tiwai committed Jan 2, 2015
1 parent c9a4585 commit e9dd862
Showing 1 changed file with 2 additions and 7 deletions.
9 changes: 2 additions & 7 deletions sound/drivers/ml403-ac97cr.c
Original file line number Diff line number Diff line change
Expand Up @@ -1238,14 +1238,11 @@ snd_ml403_ac97cr_mixer(struct snd_ml403_ac97cr *ml403_ac97cr)
}

static int
snd_ml403_ac97cr_pcm(struct snd_ml403_ac97cr *ml403_ac97cr, int device,
struct snd_pcm **rpcm)
snd_ml403_ac97cr_pcm(struct snd_ml403_ac97cr *ml403_ac97cr, int device)
{
struct snd_pcm *pcm;
int err;

if (rpcm)
*rpcm = NULL;
err = snd_pcm_new(ml403_ac97cr->card, "ML403AC97CR/1", device, 1, 1,
&pcm);
if (err < 0)
Expand All @@ -1263,8 +1260,6 @@ snd_ml403_ac97cr_pcm(struct snd_ml403_ac97cr *ml403_ac97cr, int device,
snd_dma_continuous_data(GFP_KERNEL),
64 * 1024,
128 * 1024);
if (rpcm)
*rpcm = pcm;
return 0;
}

Expand Down Expand Up @@ -1298,7 +1293,7 @@ static int snd_ml403_ac97cr_probe(struct platform_device *pfdev)
return err;
}
PDEBUG(INIT_INFO, "probe(): mixer done\n");
err = snd_ml403_ac97cr_pcm(ml403_ac97cr, 0, NULL);
err = snd_ml403_ac97cr_pcm(ml403_ac97cr, 0);
if (err < 0) {
snd_card_free(card);
return err;
Expand Down

0 comments on commit e9dd862

Please sign in to comment.