From: guneshwor.o.singh@intel.com Date: Fri, 28 Jul 2017 10:42:16 +0000 (+0530) Subject: ASoC: Intel: Skylake: Fix potential null pointer dereference X-Git-Tag: v4.14-rc4~21^2~23^2~17^2~41 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=10a5439f0e4db0b1c4c2a2f6c916d6501cfeae50;p=platform%2Fkernel%2Flinux-rpi.git ASoC: Intel: Skylake: Fix potential null pointer dereference Check if the next sink is not null to avoid potential null pointer dereference in skl_tplg_bind_sinks(). Signed-off-by: Guneshwor Singh Acked-By: Vinod Koul Signed-off-by: Mark Brown --- diff --git a/sound/soc/intel/skylake/skl-topology.c b/sound/soc/intel/skylake/skl-topology.c index 68c3f12..8c3ce08 100644 --- a/sound/soc/intel/skylake/skl-topology.c +++ b/sound/soc/intel/skylake/skl-topology.c @@ -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;