diff options
author | Xin Xie <xxie@nvidia.com> | 2011-03-22 14:23:39 -0700 |
---|---|---|
committer | Niket Sirsi <nsirsi@nvidia.com> | 2011-03-23 17:22:03 -0800 |
commit | a3d9d5c1ebc36b2a7bf0b4e375c2084afd9f64e1 (patch) | |
tree | 1853c8b6cba95b058658150cbf16332a32b5955f /sound | |
parent | 7fdb3f85de0283bd4975339822b3bba4f18f653b (diff) |
[tegra ALSA] Check uninitialized codec
bug 804615
Change-Id: I11d450febb9ab7b5576f2f67cbf03b8d953c3669
Reviewed-on: http://git-master/r/23885
Reviewed-by: Niket Sirsi <nsirsi@nvidia.com>
Tested-by: Niket Sirsi <nsirsi@nvidia.com>
Diffstat (limited to 'sound')
-rw-r--r-- | sound/soc/tegra/tegra_soc_controls.c | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/sound/soc/tegra/tegra_soc_controls.c b/sound/soc/tegra/tegra_soc_controls.c index 202fbc964024..0370a9c261f6 100644 --- a/sound/soc/tegra/tegra_soc_controls.c +++ b/sound/soc/tegra/tegra_soc_controls.c @@ -486,6 +486,9 @@ int tegra_controls_init(struct snd_soc_codec *codec) { int err; + if (codec == NULL) + return -ENODEV; + if (!audio_data) { audio_data = kzalloc(sizeof(*audio_data), GFP_KERNEL); if (!audio_data) { |