From: Uwe Kleine-König Date: Mon, 7 Jan 2019 19:53:49 +0000 (+0100) Subject: pwm: imx: Remove if block where the condition is always wrong X-Git-Url: http://git.maquefel.me/?a=commitdiff_plain;h=01482d2443db24aa5234f3ffa03b09f03c94f603;p=linux.git pwm: imx: Remove if block where the condition is always wrong 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 Signed-off-by: Thierry Reding --- diff --git a/drivers/pwm/pwm-imx.c b/drivers/pwm/pwm-imx.c index 55a3a363d5be9..1e90d2b786259 100644 --- a/drivers/pwm/pwm-imx.c +++ b/drivers/pwm/pwm-imx.c @@ -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);