]> asedeno.scripts.mit.edu Git - linux.git/blobdiff - sound/soc/soc-dapm.c
Merge tag 'pm-5.2-rc6' of git://git.kernel.org/pub/scm/linux/kernel/git/rafael/linux-pm
[linux.git] / sound / soc / soc-dapm.c
index 81a7a12196ffed084305126b14b31deca9f4be8e..55f8278077f493d7df6694429dc0201ff1c15838 100644 (file)
@@ -2193,7 +2193,10 @@ static void dapm_debugfs_add_widget(struct snd_soc_dapm_widget *w)
 
 static void dapm_debugfs_cleanup(struct snd_soc_dapm_context *dapm)
 {
+       if (!dapm->debugfs_dapm)
+               return;
        debugfs_remove_recursive(dapm->debugfs_dapm);
+       dapm->debugfs_dapm = NULL;
 }
 
 #else
@@ -3831,8 +3834,8 @@ static int snd_soc_dai_link_event(struct snd_soc_dapm_widget *w,
                                                ret);
                                        goto out;
                                }
-                               source->active++;
                        }
+                       source->active++;
                        ret = soc_dai_hw_params(&substream, params, source);
                        if (ret < 0)
                                goto out;
@@ -3853,8 +3856,8 @@ static int snd_soc_dai_link_event(struct snd_soc_dapm_widget *w,
                                                ret);
                                        goto out;
                                }
-                               sink->active++;
                        }
+                       sink->active++;
                        ret = soc_dai_hw_params(&substream, params, sink);
                        if (ret < 0)
                                goto out;