summaryrefslogtreecommitdiffstats
path: root/sound/soc/codecs/adau1977.c
diff options
context:
space:
mode:
authorFabio Estevam <fabio.estevam@nxp.com>2017-07-16 23:11:08 +0200
committerMark Brown <broonie@kernel.org>2017-07-17 16:42:03 +0200
commit68feed90070e5133c0bfe26648410a39e092018d (patch)
tree408b4e48d77767ab0b00fc53edaea670a81b7c20 /sound/soc/codecs/adau1977.c
parentLinux v4.13-rc1 (diff)
downloadlinux-68feed90070e5133c0bfe26648410a39e092018d.tar.xz
linux-68feed90070e5133c0bfe26648410a39e092018d.zip
ASoC: adau1977: Remove unneeded gpiod NULL check
The gpiod API checks for NULL descriptors, so there is no need to duplicate the check in the driver. Signed-off-by: Fabio Estevam <fabio.estevam@nxp.com> Signed-off-by: Mark Brown <broonie@kernel.org>
Diffstat (limited to 'sound/soc/codecs/adau1977.c')
-rw-r--r--sound/soc/codecs/adau1977.c6
1 files changed, 2 insertions, 4 deletions
diff --git a/sound/soc/codecs/adau1977.c b/sound/soc/codecs/adau1977.c
index b319db6a69f8..ccc5cf0e4f80 100644
--- a/sound/soc/codecs/adau1977.c
+++ b/sound/soc/codecs/adau1977.c
@@ -388,8 +388,7 @@ static int adau1977_power_disable(struct adau1977 *adau1977)
regcache_mark_dirty(adau1977->regmap);
- if (adau1977->reset_gpio)
- gpiod_set_value_cansleep(adau1977->reset_gpio, 0);
+ gpiod_set_value_cansleep(adau1977->reset_gpio, 0);
regcache_cache_only(adau1977->regmap, true);
@@ -420,8 +419,7 @@ static int adau1977_power_enable(struct adau1977 *adau1977)
goto err_disable_avdd;
}
- if (adau1977->reset_gpio)
- gpiod_set_value_cansleep(adau1977->reset_gpio, 1);
+ gpiod_set_value_cansleep(adau1977->reset_gpio, 1);
regcache_cache_only(adau1977->regmap, false);