Skip to content

Commit c5efe23

Browse files
Fabio Estevambroonie
authored andcommitted
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 <[email protected]> Signed-off-by: Mark Brown <[email protected]>
1 parent 5771a8c commit c5efe23

File tree

1 file changed

+1
-2
lines changed

1 file changed

+1
-2
lines changed

sound/soc/codecs/sta32x.c

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -847,8 +847,7 @@ static int sta32x_set_bias_level(struct snd_soc_codec *codec,
847847
msleep(300);
848848
sta32x_watchdog_stop(sta32x);
849849

850-
if (sta32x->gpiod_nreset)
851-
gpiod_set_value(sta32x->gpiod_nreset, 0);
850+
gpiod_set_value(sta32x->gpiod_nreset, 0);
852851

853852
regulator_bulk_disable(ARRAY_SIZE(sta32x->supplies),
854853
sta32x->supplies);

0 commit comments

Comments
 (0)