Skip to content

Commit c1b8ac9

Browse files
Uwe Kleine-Königthierryreding
authored andcommitted
pwm: tegra: Drop an if block with an always false condition
tegra_pwm_remove() is only called after tegra_pwm_probe() successfully completed. In this case platform_set_drvdata() was called with a non-NULL value and so platform_get_drvdata(pdev) cannot return NULL. Returning an error code from a platform_driver's remove function is ignored anyway, so it's a good thing this exit path is gone. Signed-off-by: Uwe Kleine-König <[email protected]> Signed-off-by: Thierry Reding <[email protected]>
1 parent 9ae241d commit c1b8ac9

File tree

1 file changed

+0
-3
lines changed

1 file changed

+0
-3
lines changed

drivers/pwm/pwm-tegra.c

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -303,9 +303,6 @@ static int tegra_pwm_remove(struct platform_device *pdev)
303303
unsigned int i;
304304
int err;
305305

306-
if (WARN_ON(!pc))
307-
return -ENODEV;
308-
309306
err = clk_prepare_enable(pc->clk);
310307
if (err < 0)
311308
return err;

0 commit comments

Comments
 (0)