summaryrefslogtreecommitdiff
path: root/sound
diff options
context:
space:
mode:
authorTaylor Hutt <thutt@chromium.org>2011-05-17 18:03:54 -0700
committerVarun Wadekar <vwadekar@nvidia.com>2011-12-23 12:01:59 +0530
commit004c1b9063450cc3ef5efd5c60703679658f2be7 (patch)
treec82de535553c1f07a01d416c0cebc9412a501990 /sound
parent6acd5b54a1ffc8457c863118c455f78ff43b6b15 (diff)
ASoC: Max98095: Move existing NULL check before pointer dereference.
Visual inspection shows that max98095_put_eq_enum() and max98095_put_bq_enum() each have a possible NULL deref of 'pdata'. This change moves the NULL check above the use. Signed-off-by: Taylor Hutt <thutt@chromium.org> Acked-by: Peter Hsiang <Peter.Hsiang@maxim-ic.com> Acked-by: Liam Girdwood <lrg@ti.com> Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com> (cherry picked from commit 539494253547d078089cc15490e83f6e5f2e7213) Change-Id: I587b8d2ea14cdf8ce33a4319b6c2ba3a4df067aa Signed-off-by: Ravindra Lokhande <rlokhande@nvidia.com> Reviewed-on: http://git-master/r/69963 Reviewed-by: Automatic_Commit_Validation_User Reviewed-by: Bharat Nihalani <bnihalani@nvidia.com>
Diffstat (limited to 'sound')
-rw-r--r--sound/soc/codecs/max98095.c2
1 files changed, 0 insertions, 2 deletions
diff --git a/sound/soc/codecs/max98095.c b/sound/soc/codecs/max98095.c
index 48071dcbdc4b..668434d44303 100644
--- a/sound/soc/codecs/max98095.c
+++ b/sound/soc/codecs/max98095.c
@@ -1878,7 +1878,6 @@ static int max98095_put_eq_enum(struct snd_kcontrol *kcontrol,
cdata = &max98095->dai[channel];
cdata->eq_sel = sel;
-
fs = cdata->rate;
/* Find the selected configuration with nearest sample rate */
@@ -2025,7 +2024,6 @@ static int max98095_put_bq_enum(struct snd_kcontrol *kcontrol,
cdata = &max98095->dai[channel];
cdata->bq_sel = sel;
-
fs = cdata->rate;
/* Find the selected configuration with nearest sample rate */