Commit 64b4f60f authored by Vladimir Murzin's avatar Vladimir Murzin Committed by Catalin Marinas

arm64: remove return value form psci_init()

psci_init() is written to return err code if something goes wrong. However,
the single user, setup_arch(), doesn't care about it. Moreover, every error
path is supplied with a clear message which is enough for pleasant debugging.
Signed-off-by: default avatarVladimir Murzin <vladimir.murzin@arm.com>
Acked-by: default avatarMark Rutland <mark.rutland@arm.com>
Signed-off-by: default avatarCatalin Marinas <catalin.marinas@arm.com>
parent 288ac26c
...@@ -14,6 +14,6 @@ ...@@ -14,6 +14,6 @@
#ifndef __ASM_PSCI_H #ifndef __ASM_PSCI_H
#define __ASM_PSCI_H #define __ASM_PSCI_H
int psci_init(void); void psci_init(void);
#endif /* __ASM_PSCI_H */ #endif /* __ASM_PSCI_H */
...@@ -176,22 +176,20 @@ static const struct of_device_id psci_of_match[] __initconst = { ...@@ -176,22 +176,20 @@ static const struct of_device_id psci_of_match[] __initconst = {
{}, {},
}; };
int __init psci_init(void) void __init psci_init(void)
{ {
struct device_node *np; struct device_node *np;
const char *method; const char *method;
u32 id; u32 id;
int err = 0;
np = of_find_matching_node(NULL, psci_of_match); np = of_find_matching_node(NULL, psci_of_match);
if (!np) if (!np)
return -ENODEV; return;
pr_info("probing function IDs from device-tree\n"); pr_info("probing function IDs from device-tree\n");
if (of_property_read_string(np, "method", &method)) { if (of_property_read_string(np, "method", &method)) {
pr_warning("missing \"method\" property\n"); pr_warning("missing \"method\" property\n");
err = -ENXIO;
goto out_put_node; goto out_put_node;
} }
...@@ -201,7 +199,6 @@ int __init psci_init(void) ...@@ -201,7 +199,6 @@ int __init psci_init(void)
invoke_psci_fn = __invoke_psci_fn_smc; invoke_psci_fn = __invoke_psci_fn_smc;
} else { } else {
pr_warning("invalid \"method\" property: %s\n", method); pr_warning("invalid \"method\" property: %s\n", method);
err = -EINVAL;
goto out_put_node; goto out_put_node;
} }
...@@ -227,7 +224,7 @@ int __init psci_init(void) ...@@ -227,7 +224,7 @@ int __init psci_init(void)
out_put_node: out_put_node:
of_node_put(np); of_node_put(np);
return err; return;
} }
#ifdef CONFIG_SMP #ifdef CONFIG_SMP
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment