summaryrefslogtreecommitdiff
path: root/sound/soc/sunxi
diff options
context:
space:
mode:
authorFabio Estevam <fabio.estevam@nxp.com>2017-07-16 18:11:06 -0300
committerMark Brown <broonie@kernel.org>2017-07-17 15:40:05 +0100
commitd51579e6effa19c1ca4d6a29c3841cb454d56af6 (patch)
tree269d1ee5e978bc9286543e48f187b102744179f9 /sound/soc/sunxi
parent5771a8c08880cdca3bfb4a3fc6d309d6bba20877 (diff)
ASoC: sun4i-codec: 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/sunxi')
-rw-r--r--sound/soc/sunxi/sun4i-codec.c5
1 files changed, 2 insertions, 3 deletions
diff --git a/sound/soc/sunxi/sun4i-codec.c b/sound/soc/sunxi/sun4i-codec.c
index 150069987c0c..4c37231f254b 100644
--- a/sound/soc/sunxi/sun4i-codec.c
+++ b/sound/soc/sunxi/sun4i-codec.c
@@ -1171,9 +1171,8 @@ static int sun4i_codec_spk_event(struct snd_soc_dapm_widget *w,
{
struct sun4i_codec *scodec = snd_soc_card_get_drvdata(w->dapm->card);
- if (scodec->gpio_pa)
- gpiod_set_value_cansleep(scodec->gpio_pa,
- !!SND_SOC_DAPM_EVENT_ON(event));
+ gpiod_set_value_cansleep(scodec->gpio_pa,
+ !!SND_SOC_DAPM_EVENT_ON(event));
return 0;
}