From: Venkatesh Yadav Abbarapu Date: Mon, 12 Aug 2019 10:06:42 +0000 (+0530) Subject: can: xilinx_can: xcan_probe(): skip error message on deferred probe X-Git-Tag: v5.4-rc1~131^2~229^2~29 X-Git-Url: https://asedeno.scripts.mit.edu/gitweb/?a=commitdiff_plain;h=6b0d35891c835319291f2c3b459e666fc809f831;p=linux.git can: xilinx_can: xcan_probe(): skip error message on deferred probe When can clock is provided from the clock wizard, clock wizard driver may not be available when can driver probes resulting to the error message "Device clock not found error". As this error message is not very userful to the end user, skip printing it in the case of deferred probe. Fixes: b1201e44 ("can: xilinx CAN controller support") Signed-off-by: Appana Durga Kedareswara rao Signed-off-by: Venkatesh Yadav Abbarapu Signed-off-by: Michal Simek Signed-off-by: Marc Kleine-Budde --- diff --git a/drivers/net/can/xilinx_can.c b/drivers/net/can/xilinx_can.c index c7d043a40837..161bb5e1f378 100644 --- a/drivers/net/can/xilinx_can.c +++ b/drivers/net/can/xilinx_can.c @@ -1780,7 +1780,8 @@ static int xcan_probe(struct platform_device *pdev) /* Getting the CAN can_clk info */ priv->can_clk = devm_clk_get(&pdev->dev, "can_clk"); if (IS_ERR(priv->can_clk)) { - dev_err(&pdev->dev, "Device clock not found.\n"); + if (PTR_ERR(priv->can_clk) != -EPROBE_DEFER) + dev_err(&pdev->dev, "Device clock not found.\n"); ret = PTR_ERR(priv->can_clk); goto err_free; }