]> git.baikalelectronics.ru Git - kernel.git/commit
ASoC: Intel: Skylake: Fix null ptr dereferenced in skl_tplg_bind_sinks
authorJeeja KP <jeeja.kp@intel.com>
Fri, 13 Nov 2015 13:52:11 +0000 (19:22 +0530)
committerMark Brown <broonie@kernel.org>
Wed, 18 Nov 2015 18:46:36 +0000 (18:46 +0000)
commit204428cc139913bfae322a5914b8c83aacd3189a
tree194361780c8738faf0fc93abc7cfca51c8bc37b2
parent8307ceda22b8014f6bc00016f438b78fd37cf794
ASoC: Intel: Skylake: Fix null ptr dereferenced in skl_tplg_bind_sinks

This patch fixes the below warning form smatch and makes the
skl_tplg_bind_sinks take the next sink as argument which is true
when the current sink is valid

sound/soc/intel/skylake/skl-topology.c:453 skl_tplg_bind_sinks()
error: we previously assumed 'sink' could be null (see line 452)

sound/soc/intel/skylake/skl-topology.c
   451
   452 if (!sink)
                     ^^^^
New check.  Reversed?

   453 return skl_tplg_bind_sinks(sink, skl, src_mconfig);
                                                   ^^^^ This is
dereferenced inside the function.

   454
   455 return 0;

Reported-by: Dan Carpenter <dan.carpenter@oracle.com>
Signed-off-by: Jeeja KP <jeeja.kp@intel.com>
Signed-off-by: Vinod Koul <vinod.koul@intel.com>
Signed-off-by: Mark Brown <broonie@kernel.org>
sound/soc/intel/skylake/skl-topology.c