summaryrefslogtreecommitdiffstats
path: root/sound
diff options
context:
space:
mode:
authorFabio Estevam2017-07-16 23:11:13 +0200
committerMark Brown2017-07-17 16:43:55 +0200
commitc5efe232e09ef29cc2f9e8333a49dd8891366c22 (patch)
treea0586cd183049b2e0840b8a402132febfe2269a1 /sound
parentLinux v4.13-rc1 (diff)
downloadkernel-qcow2-linux-c5efe232e09ef29cc2f9e8333a49dd8891366c22.tar.gz
kernel-qcow2-linux-c5efe232e09ef29cc2f9e8333a49dd8891366c22.tar.xz
kernel-qcow2-linux-c5efe232e09ef29cc2f9e8333a49dd8891366c22.zip
ASoC: sta32x: 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')
-rw-r--r--sound/soc/codecs/sta32x.c3
1 files changed, 1 insertions, 2 deletions
diff --git a/sound/soc/codecs/sta32x.c b/sound/soc/codecs/sta32x.c
index 0790ae8530d9..5b888476d9ff 100644
--- a/sound/soc/codecs/sta32x.c
+++ b/sound/soc/codecs/sta32x.c
@@ -847,8 +847,7 @@ static int sta32x_set_bias_level(struct snd_soc_codec *codec,
msleep(300);
sta32x_watchdog_stop(sta32x);
- if (sta32x->gpiod_nreset)
- gpiod_set_value(sta32x->gpiod_nreset, 0);
+ gpiod_set_value(sta32x->gpiod_nreset, 0);
regulator_bulk_disable(ARRAY_SIZE(sta32x->supplies),
sta32x->supplies);