Skip to content

Commit b46d59c

Browse files
Uwe Kleine-Königbebarino
authored andcommitted
clk: xilinx: Drop if block with always false condition
xvcu_remove() is only called for a device after after xvcu_probe() completed successfully. In that case dev_set_drvdata() was called for that device with a non-NULL parameter, so platform_get_drvdata() won't return NULL and the if condition is never true. Drop the if, preparing a conversion to make platform driver's remove callback return void. Signed-off-by: Uwe Kleine-König <u.kleine-koenig@pengutronix.de> Link: https://lore.kernel.org/r/20230312161512.2715500-4-u.kleine-koenig@pengutronix.de Signed-off-by: Stephen Boyd <sboyd@kernel.org>
1 parent c73e435 commit b46d59c

1 file changed

Lines changed: 0 additions & 2 deletions

File tree

drivers/clk/xilinx/xlnx_vcu.c

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -707,8 +707,6 @@ static int xvcu_remove(struct platform_device *pdev)
707707
struct xvcu_device *xvcu;
708708

709709
xvcu = platform_get_drvdata(pdev);
710-
if (!xvcu)
711-
return -ENODEV;
712710

713711
xvcu_unregister_clock_provider(xvcu);
714712

0 commit comments

Comments
 (0)