diff options
author | Uwe Kleine-König <u.kleine-koenig@pengutronix.de> | 2023-03-12 17:14:45 +0100 |
---|---|---|
committer | Stephen Boyd <sboyd@kernel.org> | 2023-03-28 19:23:35 -0700 |
commit | b46d59cb18321705d7fe8cf84c20e01553116418 (patch) | |
tree | ce495e0c79fe127f6dced6e7843225ecff92d7db /drivers/clk | |
parent | c73e435e9b754d43aa8925152caedd54758e55be (diff) | |
download | linux-stable-b46d59cb18321705d7fe8cf84c20e01553116418.tar.gz linux-stable-b46d59cb18321705d7fe8cf84c20e01553116418.tar.bz2 linux-stable-b46d59cb18321705d7fe8cf84c20e01553116418.zip |
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>
Diffstat (limited to 'drivers/clk')
-rw-r--r-- | drivers/clk/xilinx/xlnx_vcu.c | 2 |
1 files changed, 0 insertions, 2 deletions
diff --git a/drivers/clk/xilinx/xlnx_vcu.c b/drivers/clk/xilinx/xlnx_vcu.c index d66b1315114e..54b44debfd3e 100644 --- a/drivers/clk/xilinx/xlnx_vcu.c +++ b/drivers/clk/xilinx/xlnx_vcu.c @@ -707,8 +707,6 @@ static int xvcu_remove(struct platform_device *pdev) struct xvcu_device *xvcu; xvcu = platform_get_drvdata(pdev); - if (!xvcu) - return -ENODEV; xvcu_unregister_clock_provider(xvcu); |