mirror of
https://github.com/AuxXxilium/linux_dsm_epyc7002.git
synced 2024-11-25 23:20:51 +07:00
soc: brcmstb: Fix error path for unsupported CPUs
In case setup_hifcpubiuctrl_regs() returns an error, because of e.g:
an unsupported CPU type, just catch that error and return instead of
blindly continuing with the initialization. This fixes a NULL pointer
de-reference with the code continuing without having a proper array of
registers to use.
Fixes: 22f7a9116e
("soc: brcmstb: Correct CPU_CREDIT_REG offset for Brahma-B53 CPUs")
Signed-off-by: Florian Fainelli <f.fainelli@gmail.com>
This commit is contained in:
parent
a188339ca5
commit
490cad5a3a
@ -246,7 +246,9 @@ static int __init brcmstb_biuctrl_init(void)
|
||||
if (!np)
|
||||
return 0;
|
||||
|
||||
setup_hifcpubiuctrl_regs(np);
|
||||
ret = setup_hifcpubiuctrl_regs(np);
|
||||
if (ret)
|
||||
return ret;
|
||||
|
||||
ret = mcp_write_pairing_set();
|
||||
if (ret) {
|
||||
|
Loading…
Reference in New Issue
Block a user