summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorJernej Skrabec <jernej.skrabec@gmail.com>2021-10-10 09:18:12 +0200
committerMaxime Ripard <maxime@cerno.tech>2021-10-13 14:48:48 +0200
commit50ac48ae3e80359a475216de8c3b0ec12374fa66 (patch)
tree08ac73621fea53b10be699dd21c0fac5567b1a13
parentsoc: sunxi_sram: Make use of the helper function devm_platform_ioremap_resour... (diff)
downloadlinux-50ac48ae3e80359a475216de8c3b0ec12374fa66.tar.xz
linux-50ac48ae3e80359a475216de8c3b0ec12374fa66.zip
bus: sun50i-de2: Adjust printing error message
SRAM driver often returns -EPROBE_DEFER and thus this bus driver often prints error message, even if it probes successfully later. This is confusing for users and they often think that something is wrong. Use dev_err_probe() helper for printing error message. It handles -EPROBE_DEFER automatically. Signed-off-by: Jernej Skrabec <jernej.skrabec@gmail.com> Reviewed-by: Andre Przywara <andre.przywara@arm.com> Signed-off-by: Maxime Ripard <maxime@cerno.tech> Link: https://lore.kernel.org/r/20211010071812.145178-1-jernej.skrabec@gmail.com
-rw-r--r--drivers/bus/sun50i-de2.c7
1 files changed, 3 insertions, 4 deletions
diff --git a/drivers/bus/sun50i-de2.c b/drivers/bus/sun50i-de2.c
index 672518741f86..414f29cdedf0 100644
--- a/drivers/bus/sun50i-de2.c
+++ b/drivers/bus/sun50i-de2.c
@@ -15,10 +15,9 @@ static int sun50i_de2_bus_probe(struct platform_device *pdev)
int ret;
ret = sunxi_sram_claim(&pdev->dev);
- if (ret) {
- dev_err(&pdev->dev, "Error couldn't map SRAM to device\n");
- return ret;
- }
+ if (ret)
+ return dev_err_probe(&pdev->dev, ret,
+ "Couldn't map SRAM to device\n");
of_platform_populate(np, NULL, NULL, &pdev->dev);