Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit d51579e6 authored by Fabio Estevam's avatar Fabio Estevam Committed by Mark Brown
Browse files

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: default avatarFabio Estevam <fabio.estevam@nxp.com>
Signed-off-by: default avatarMark Brown <broonie@kernel.org>
parent 5771a8c0
Loading
Loading
Loading
Loading
+2 −3
Original line number Diff line number Diff line
@@ -1171,7 +1171,6 @@ 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));