[alsa-devel] [PATCH 4/4] ASoC: Intel: Skylake: Fix potential null pointer dereference
Guneshwor Singh
guneshwor.o.singh at intel.com
Fri Jul 28 12:42:16 CEST 2017
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 at intel.com>
---
sound/soc/intel/skylake/skl-topology.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/sound/soc/intel/skylake/skl-topology.c b/sound/soc/intel/skylake/skl-topology.c
index 68c3f121efc3..8c3ce08f366d 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;
--
2.13.0
More information about the Alsa-devel
mailing list