clk: clocking-wizard: Use dev_err_probe() helper
Subsystems (2)
PATCH 1/1 clk: clocking-wizard: Use dev_err_probe() helper
dev_err() can be replace with dev_err_probe() which will check if error code is -EPROBE_DEFER.
Signed-off-by Yang Yingliang <[email protected]>
--- drivers/clk/xilinx/clk-xlnx-clock-wizard.c | 16 ++++++---------- 1 file changed, 6 insertions(+), 10 deletions(-)
drivers/clk/xilinx/clk-xlnx-clock-wizard.c +6 -10
@@ -448,18 +448,14 @@ static int clk_wzrd_probe(struct platform_device *pdev) } clk_wzrd->clk_in1 =devm_clk_get (&pdev->dev,"clk_in1" ); -if (IS_ERR (clk_wzrd->clk_in1)) { -if (clk_wzrd->clk_in1 !=ERR_PTR (-EPROBE_DEFER )) -dev_err (&pdev->dev,"clk_in1 not found\n" ); -return PTR_ERR (clk_wzrd->clk_in1); - } +if (IS_ERR (clk_wzrd->clk_in1)) +return dev_err_probe (&pdev->dev,PTR_ERR (clk_wzrd->clk_in1), +"clk_in1 not found\n" ); clk_wzrd->axi_clk =devm_clk_get (&pdev->dev,"s_axi_aclk" ); -if (IS_ERR (clk_wzrd->axi_clk)) { -if (clk_wzrd->axi_clk !=ERR_PTR (-EPROBE_DEFER )) -dev_err (&pdev->dev,"s_axi_aclk not found\n" ); -return PTR_ERR (clk_wzrd->axi_clk); - } +if (IS_ERR (clk_wzrd->axi_clk)) +return dev_err_probe (&pdev->dev,PTR_ERR (clk_wzrd->axi_clk), +"s_axi_aclk not found\n" ); ret =clk_prepare_enable (clk_wzrd->axi_clk);if (ret) {dev_err (&pdev->dev,"enabling s_axi_aclk failed\n" );
Signature · 1 line
2.25.1
Quoting Yang Yingliang (2022-09-12 20:14:42)
Quoted 5 lines
dev_err()can be replace withdev_err_probe()which will check if error code is -EPROBE_DEFER.Signed-off-by Yang Yingliang <[email protected]>---
Applied to clk-next