ASoC: skl: Fix kernel warning due to zero NHTL entry
commit5711cf9b8908770e96d2b91fae6c6684e183f54f
authorTakashi Iwai <tiwai@suse.de>
Wed, 3 Jan 2018 15:38:46 +0000 (3 16:38 +0100)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Fri, 16 Feb 2018 19:06:52 +0000 (16 20:06 +0100)
treedda447bde1950b3d742dd480b9b4cd399b096d8b
parent3a042d14100fdc55a50739fc8b98c1e7c4129968
ASoC: skl: Fix kernel warning due to zero NHTL entry

commit 20a1ea2222e7cbf96e9bf8579362e971491e6aea upstream.

I got the following kernel warning when loading snd-soc-skl module on
Dell Latitude 7270 laptop:
 memremap attempted on mixed range 0x0000000000000000 size: 0x0
 WARNING: CPU: 0 PID: 484 at kernel/memremap.c:98 memremap+0x8a/0x180
 Call Trace:
  skl_nhlt_init+0x82/0xf0 [snd_soc_skl]
  skl_probe+0x2ee/0x7c0 [snd_soc_skl]
  ....

It seems that the machine doesn't support the SKL DSP gives the empty
NHLT entry, and it triggers the warning.  For avoiding it, let do the
zero check before calling memremap().

Signed-off-by: Takashi Iwai <tiwai@suse.de>
Signed-off-by: Mark Brown <broonie@kernel.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
sound/soc/intel/skylake/skl-nhlt.c