]> git.baikalelectronics.ru Git - kernel.git/commit
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)
commitea2e4962c928690c275b02b75ce99d88c46a8f2b
tree467722226e5e3beb5e86e858a1eeff32a053636a
parenteafb69e30fd2c5eb541ab8464cb7c24186e23039
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