]> git.baikalelectronics.ru Git - kernel.git/commit
ASoC: hdac_hdmi: Fix to check num nodes correctly
authorSubhransu S. Prusty <subhransu.s.prusty@intel.com>
Wed, 9 Dec 2015 16:16:08 +0000 (21:46 +0530)
committerMark Brown <broonie@kernel.org>
Tue, 5 Jan 2016 19:18:34 +0000 (19:18 +0000)
commit24ac2ea8a4b41ee482ce8c850d070d0d8011e35d
treeaaa18d4c91af3023146db6c8b8cb7961675b38c7
parentae3971f708bb933f0ee583759044677d48dc6316
ASoC: hdac_hdmi: Fix to check num nodes correctly

commit d91f5069979b ("ASoC: hdac_hdmi: check error return") fixes
the static checker warning reported by Dan Carpenter:

sound/soc/codecs/hdac_hdmi.c:416 hdac_hdmi_parse_and_map_nid()
warn: unsigned 'hdac->num_nodes' is never less than zero.

But it doesn't fix the issue completely.

It's also a failure if no sub nodes found for an afg node. So modify
the return condition appropriately.

Signed-off-by: Subhransu S. Prusty <subhransu.s.prusty@intel.com>
Signed-off-by: Vinod Koul <vinod.koul@intel.com>
Signed-off-by: Mark Brown <broonie@kernel.org>
sound/soc/codecs/hdac_hdmi.c