From 73a9619b85497d19b74e6a023aa9ce0e88a1143d Mon Sep 17 00:00:00 2001 From: Ahmad Fatoum Date: Mon, 31 May 2021 09:12:39 +0200 Subject: ARM: report probe error at arm_add_mem_device() callsites on failure Failure to add one memory bank shouldn't prevent the driver from trying to add other memory banks, but the user should be informed as this points at a misconfiguration. Have the probe functions eventually fail with -EBUSY in such a case. Signed-off-by: Ahmad Fatoum Link: https://lore.barebox.org/20210531071239.30653-7-a.fatoum@pengutronix.de Signed-off-by: Sascha Hauer --- arch/arm/mach-at91/ddramc.c | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) (limited to 'arch/arm/mach-at91') diff --git a/arch/arm/mach-at91/ddramc.c b/arch/arm/mach-at91/ddramc.c index 0aece5345f..8f70b4ada2 100644 --- a/arch/arm/mach-at91/ddramc.c +++ b/arch/arm/mach-at91/ddramc.c @@ -44,9 +44,7 @@ static int sama5_ddr_probe(struct device_d *dev) return PTR_ERR(iores); base = IOMEM(iores->start); - arm_add_mem_device("ram0", SAMA5_DDRCS, sama5_ramsize(base)); - - return 0; + return arm_add_mem_device("ram0", SAMA5_DDRCS, sama5_ramsize(base)); } static struct of_device_id sama5_ddr_dt_ids[] = { -- cgit v1.2.3