diff options
author | Uwe Kleine-König <u.kleine-koenig@pengutronix.de> | 2019-01-07 20:53:49 +0100 |
---|---|---|
committer | Thierry Reding <thierry.reding@gmail.com> | 2019-01-10 09:37:40 +0100 |
commit | 01482d2443db24aa5234f3ffa03b09f03c94f603 (patch) | |
tree | 1322e45399d91c47963d4a6e6e2c61653275987a /drivers/pwm | |
parent | 5d0a4c11896e8b83f816f135c24b184d4ba57741 (diff) | |
download | lwn-01482d2443db24aa5234f3ffa03b09f03c94f603.tar.gz lwn-01482d2443db24aa5234f3ffa03b09f03c94f603.zip |
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 <u.kleine-koenig@pengutronix.de>
Signed-off-by: Thierry Reding <thierry.reding@gmail.com>
Diffstat (limited to 'drivers/pwm')
-rw-r--r-- | drivers/pwm/pwm-imx.c | 2 |
1 files changed, 0 insertions, 2 deletions
diff --git a/drivers/pwm/pwm-imx.c b/drivers/pwm/pwm-imx.c index 55a3a363d5be..1e90d2b78625 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); |