Merge tag 'for-linus-20150216' of git://git.infradead.org/linux-mtd
[firefly-linux-kernel-4.4.55.git] / sound / drivers / ml403-ac97cr.c
index bcca825a1c8dc6fb1fce435ba9744aa0f2c5de4e..bdcb5721393b1b326497e7a9e4fa43c60a2c3ee5 100644 (file)
@@ -1094,8 +1094,7 @@ static int snd_ml403_ac97cr_free(struct snd_ml403_ac97cr *ml403_ac97cr)
        if (ml403_ac97cr->capture_irq >= 0)
                free_irq(ml403_ac97cr->capture_irq, ml403_ac97cr);
        /* give back "port" */
-       if (ml403_ac97cr->port != NULL)
-               iounmap(ml403_ac97cr->port);
+       iounmap(ml403_ac97cr->port);
        kfree(ml403_ac97cr);
        PDEBUG(INIT_INFO, "free(): (done)\n");
        return 0;
@@ -1238,14 +1237,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)
@@ -1263,8 +1259,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;
 }
 
@@ -1298,7 +1292,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;