ASoC: Max98095: Move existing NULL check before pointer dereference.
authorTaylor Hutt <thutt@chromium.org>
Wed, 18 May 2011 01:03:54 +0000 (18:03 -0700)
committerVarun Wadekar <vwadekar@nvidia.com>
Fri, 23 Dec 2011 06:31:59 +0000 (11:31 +0530)
commit004c1b9063450cc3ef5efd5c60703679658f2be7
treec82de535553c1f07a01d416c0cebc9412a501990
parent6acd5b54a1ffc8457c863118c455f78ff43b6b15
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>
sound/soc/codecs/max98095.c