# \[PATCH 1/1\] powerpc/ps3: Fix error return code in ps3\_register\_devices()

- From: Zhen Lei \<hidden\>
- Date: 2021-05-18 06:59:35 
- List: linuxppc-dev
- Page: https://ratatoskr.run/linuxppc-dev/2021/05/9522772
- Thread: https://ratatoskr.run/linuxppc-dev/2021/05/9522772/t.md

```text
When call ps3_start_probe_thread() failed, further initialization should
be stopped and the returned error code should be propagated.

Reported-by: Hulk Robot <redacted>
Signed-off-by: Zhen Lei <redacted>
---
 arch/powerpc/platforms/ps3/device-init.c | 2 ++
 1 file changed, 2 insertions(+)

diff --git a/arch/powerpc/platforms/ps3/device-init.c b/arch/powerpc/platforms/ps3/device-init.c
index e87360a0fb40..9b6d8ca8fc01 100644
--- a/arch/powerpc/platforms/ps3/device-init.c
+++ b/arch/powerpc/platforms/ps3/device-init.c
@@ -955,6 +955,8 @@ static int __init ps3_register_devices(void)
 	/* ps3_repository_dump_bus_info(); */
 
 	result = ps3_start_probe_thread(PS3_BUS_TYPE_STORAGE);
+	if (result < 0)
+		return result;
 
 	ps3_register_vuart_devices();
 
-- 
2.25.1


```
