]> git.baikalelectronics.ru Git - kernel.git/commit
soc: brcmstb: Fix error path for unsupported CPUs
authorFlorian Fainelli <f.fainelli@gmail.com>
Sun, 7 Apr 2019 21:19:07 +0000 (14:19 -0700)
committerFlorian Fainelli <f.fainelli@gmail.com>
Mon, 20 May 2019 16:27:50 +0000 (09:27 -0700)
commit29bf53d012af4e7484eebcd67d2a4cddddd78df4
tree8b041f7eba812b51f84bd0a251e934e3c92e5058
parent49250288820449e26abffc1305ba221bd05ce90d
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: 6b03fa8d248e ("soc: brcmstb: Correct CPU_CREDIT_REG offset for Brahma-B53 CPUs")
Signed-off-by: Florian Fainelli <f.fainelli@gmail.com>
drivers/soc/bcm/brcmstb/biuctrl.c