]> asedeno.scripts.mit.edu Git - linux.git/commitdiff
ASoC: Intel: Skylake: Fix potential null pointer dereference
authorguneshwor.o.singh@intel.com <guneshwor.o.singh@intel.com>
Fri, 28 Jul 2017 10:42:16 +0000 (16:12 +0530)
committerMark Brown <broonie@kernel.org>
Tue, 1 Aug 2017 12:34:09 +0000 (13:34 +0100)
Check if the next sink is not null to avoid potential null pointer
dereference in skl_tplg_bind_sinks().

Signed-off-by: Guneshwor Singh <guneshwor.o.singh@intel.com>
Acked-By: Vinod Koul <vinod.koul@intel.com>
Signed-off-by: Mark Brown <broonie@kernel.org>
sound/soc/intel/skylake/skl-topology.c

index 68c3f121efc3b22a4caff235303be07ba9914721..8c3ce08f366d222351377b6325d7e2b9c65bd7df 100644 (file)
@@ -925,7 +925,7 @@ static int skl_tplg_bind_sinks(struct snd_soc_dapm_widget *w,
                }
        }
 
-       if (!sink)
+       if (!sink && next_sink)
                return skl_tplg_bind_sinks(next_sink, skl, src_w, src_mconfig);
 
        return 0;