pwm: imx: Remove if block where the condition is always wrong
authorUwe Kleine-König <u.kleine-koenig@pengutronix.de>
Mon, 7 Jan 2019 19:53:49 +0000 (20:53 +0100)
committerThierry Reding <thierry.reding@gmail.com>
Thu, 10 Jan 2019 08:37:40 +0000 (09:37 +0100)
The ->remove() callback is only called when probe returned successfully.
In this case the driver data cannot be NULL.

Signed-off-by: Uwe Kleine-König <u.kleine-koenig@pengutronix.de>
Signed-off-by: Thierry Reding <thierry.reding@gmail.com>
drivers/pwm/pwm-imx.c

index 55a3a36..1e90d2b 100644 (file)
@@ -444,8 +444,6 @@ static int imx_pwm_remove(struct platform_device *pdev)
        struct imx_chip *imx;
 
        imx = platform_get_drvdata(pdev);
-       if (imx == NULL)
-               return -ENODEV;
 
        imx_pwm_clk_disable_unprepare(&imx->chip);