ASoC: hdac_hdmi: Fix potential NULL dereference
authorVinod Koul <vinod.koul@intel.com>
Tue, 31 May 2016 13:39:55 +0000 (19:09 +0530)
committerMark Brown <broonie@kernel.org>
Mon, 11 Jul 2016 17:19:33 +0000 (18:19 +0100)
commit7edf4db15899214867fe60bd31102309f2cc5ede
tree5f273b522bcd24d789b2ba69036ee7af337e3c21
parent0d6821040034b8bfc9d9a4e6c2236f3a9e02650f
ASoC: hdac_hdmi: Fix potential NULL dereference

Static checker warns:
Pointer 'hlink' returned from call to function 'snd_hdac_ext_bus_get_link'
at line may be NULL and will be dereferenced"

So we should always check the return of snd_hdac_ext_bus_get_link() before
referencing the link pointer

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