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

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

regulator: pwm-regulator: 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 760068be
Loading
Loading
Loading
Loading
+2 −4
Original line number Diff line number Diff line
@@ -122,7 +122,6 @@ static int pwm_regulator_enable(struct regulator_dev *dev)
{
	struct pwm_regulator_data *drvdata = rdev_get_drvdata(dev);

	if (drvdata->enb_gpio)
	gpiod_set_value_cansleep(drvdata->enb_gpio, 1);

	return pwm_enable(drvdata->pwm);
@@ -134,7 +133,6 @@ static int pwm_regulator_disable(struct regulator_dev *dev)

	pwm_disable(drvdata->pwm);

	if (drvdata->enb_gpio)
	gpiod_set_value_cansleep(drvdata->enb_gpio, 0);

	return 0;