ASoC: rsnd: Fix possible NULL pointer dereference
authorMarek Vasut <marek.vasut+renesas@gmail.com>
Fri, 21 Apr 2017 00:41:20 +0000 (00:41 +0000)
committerMark Brown <broonie@kernel.org>
Fri, 21 Apr 2017 16:51:48 +0000 (17:51 +0100)
commite8dffe6c2004278c588b3bb441a3dbe998a3f2e4
tree2ae9efc7f10f342bc93ff235facea2ead65a68d3
parent75f9e4adb56fbb8ffaab7d316f0c02df00e4b755
ASoC: rsnd: Fix possible NULL pointer dereference

25165f79adc76b812bfb4d8f2ab120aafb28d0e6
("ASoC: rsnd: enable clock-frequency for both 44.1kHz/48kHz")
supports both 44.1kHz/48kHz clock-frequency settings for ADG
which will be used for AUDIO_OLKOUTn.
But some board doesn't need it, thus, it is not mandatory.

But, above patch didn't care about the case of "clock-frequency" DT
property was not present.
This patch ignores ADG settings if AUDIO_OLKOUTn was not used.

Signed-off-by: Marek Vasut <marek.vasut+renesas@gmail.com>
[Kuninori: tidyup not to break non AUDIO_OLKOUTn case]
Signed-off-by: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com>
Signed-off-by: Mark Brown <broonie@kernel.org>
sound/soc/sh/rcar/adg.c