[PATCH 4/6] drivers: pwm: imx: Remove redundant assignment

Alexander Shiyan eagle.alexander923 at gmail.com
Tue Jun 28 23:30:22 PDT 2022


Signed-off-by: Alexander Shiyan <eagle.alexander923 at gmail.com>
---
 drivers/pwm/pwm-imx.c | 8 ++------
 1 file changed, 2 insertions(+), 6 deletions(-)

diff --git a/drivers/pwm/pwm-imx.c b/drivers/pwm/pwm-imx.c
index 609765d895..c542b72796 100644
--- a/drivers/pwm/pwm-imx.c
+++ b/drivers/pwm/pwm-imx.c
@@ -206,7 +206,7 @@ static int imx_pwm_probe(struct device_d *dev)
 	struct resource *iores;
 	const struct imx_pwm_data *data;
 	struct imx_chip *imx;
-	int ret = 0;
+	int ret;
 
 	ret = dev_get_drvdata(dev, (const void **)&data);
 	if (ret)
@@ -236,11 +236,7 @@ static int imx_pwm_probe(struct device_d *dev)
 	imx->config = data->config;
 	imx->set_enable = data->set_enable;
 
-	ret = pwmchip_add(&imx->chip, dev);
-	if (ret < 0)
-		return ret;
-
-	return 0;
+	return pwmchip_add(&imx->chip, dev);;
 }
 
 static struct driver_d imx_pwm_driver = {
-- 
2.32.0




More information about the barebox mailing list