summaryrefslogtreecommitdiffstats
path: root/drivers/fpga/xilinx-pr-decoupler.c
diff options
context:
space:
mode:
authorMichal Simek <michal.simek@xilinx.com>2021-02-04 14:36:11 +0100
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>2021-03-24 08:26:20 +0100
commitb5c6ecfd471ead372a158c7ca9167e4dcc2a1deb (patch)
treedee932f749ea97982f0784bdaa87e8abf5244b98 /drivers/fpga/xilinx-pr-decoupler.c
parentfpga: fpga-mgr: xilinx-spi: fix error messages on -EPROBE_DEFER (diff)
downloadlinux-b5c6ecfd471ead372a158c7ca9167e4dcc2a1deb.tar.xz
linux-b5c6ecfd471ead372a158c7ca9167e4dcc2a1deb.zip
fpga: xilinx-pr-decoupler: Simplify code by using dev_err_probe()
Use already prepared dev_err_probe() introduced by commit a787e5400a1c ("driver core: add device probe log helper"). It simplifies EPROBE_DEFER handling. Signed-off-by: Michal Simek <michal.simek@xilinx.com> Signed-off-by: Moritz Fischer <mdf@kernel.org> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Diffstat (limited to 'drivers/fpga/xilinx-pr-decoupler.c')
-rw-r--r--drivers/fpga/xilinx-pr-decoupler.c8
1 files changed, 3 insertions, 5 deletions
diff --git a/drivers/fpga/xilinx-pr-decoupler.c b/drivers/fpga/xilinx-pr-decoupler.c
index 7d69af230567..b0eaf26af6e7 100644
--- a/drivers/fpga/xilinx-pr-decoupler.c
+++ b/drivers/fpga/xilinx-pr-decoupler.c
@@ -100,11 +100,9 @@ static int xlnx_pr_decoupler_probe(struct platform_device *pdev)
return PTR_ERR(priv->io_base);
priv->clk = devm_clk_get(&pdev->dev, "aclk");
- if (IS_ERR(priv->clk)) {
- if (PTR_ERR(priv->clk) != -EPROBE_DEFER)
- dev_err(&pdev->dev, "input clock not found\n");
- return PTR_ERR(priv->clk);
- }
+ if (IS_ERR(priv->clk))
+ return dev_err_probe(&pdev->dev, PTR_ERR(priv->clk),
+ "input clock not found\n");
err = clk_prepare_enable(priv->clk);
if (err) {