ASoC: rt5645: Fix potential crash in jd function
authorBard Liao <bardliao@realtek.com>
Tue, 9 Dec 2014 02:14:45 +0000 (10:14 +0800)
committerMark Brown <broonie@kernel.org>
Tue, 9 Dec 2014 16:10:45 +0000 (16:10 +0000)
commit75945896a2f4a7ebfc3402443f99ac32f629ee96
tree6595e5f653e18fbe5f3cda3f27896285dbd49c6a
parentdf078d291d9b50e3ccfb8f030f85de701696a5ad
ASoC: rt5645: Fix potential crash in jd function

If no one defined the rt5645->pdata.hp_det_gpio in coreboot/bios.
It will cause kernel to reboot because rt5645->pdata.hp_det_gpio
is 0. So it is worth to add a check in rt5645_jack_detect.

Signed-off-by: Bard Liao <bardliao@realtek.com>
Signed-off-by: Fang, Yang A <yang.a.fang@intel.com>
Signed-off-by: Mark Brown <broonie@kernel.org>
sound/soc/codecs/rt5645.c