diff options
author | Ahmad Fatoum <a.fatoum@pengutronix.de> | 2021-05-31 09:12:39 +0200 |
---|---|---|
committer | Sascha Hauer <s.hauer@pengutronix.de> | 2021-06-02 08:37:23 +0200 |
commit | 73a9619b85497d19b74e6a023aa9ce0e88a1143d (patch) | |
tree | fc3798b8dcbbf05b39b8d8f378525bc1a1abd993 /arch/arm/mach-stm32mp | |
parent | 829d119ed6b70d13a489442d8a545cf1e66bdc7b (diff) | |
download | barebox-73a9619b85497d19b74e6a023aa9ce0e88a1143d.tar.gz barebox-73a9619b85497d19b74e6a023aa9ce0e88a1143d.tar.xz |
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 <a.fatoum@pengutronix.de>
Link: https://lore.barebox.org/20210531071239.30653-7-a.fatoum@pengutronix.de
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
Diffstat (limited to 'arch/arm/mach-stm32mp')
-rw-r--r-- | arch/arm/mach-stm32mp/ddrctrl.c | 4 |
1 files changed, 1 insertions, 3 deletions
diff --git a/arch/arm/mach-stm32mp/ddrctrl.c b/arch/arm/mach-stm32mp/ddrctrl.c index 646fe4401a..43486c57c5 100644 --- a/arch/arm/mach-stm32mp/ddrctrl.c +++ b/arch/arm/mach-stm32mp/ddrctrl.c @@ -132,9 +132,7 @@ static int stm32mp1_ddr_probe(struct device_d *dev) return PTR_ERR(iores); base = IOMEM(iores->start); - arm_add_mem_device("ram0", STM32_DDR_BASE, ddrctrl_ramsize(base)); - - return 0; + return arm_add_mem_device("ram0", STM32_DDR_BASE, ddrctrl_ramsize(base)); } static __maybe_unused struct of_device_id stm32mp1_ddr_dt_ids[] = { |