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>
Tue, 31 May 2016 13:36:30 +0000 (14:36 +0100)
commit500e06b9a3f50d3db992eb3b8dc309f695d33f63
tree467722226e5e3beb5e86e858a1eeff32a053636a
parent1a695a905c18548062509178b98bc91e67510864
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