mirror of
https://mirrors.bfsu.edu.cn/git/linux.git
synced 2024-11-11 21:38:32 +08:00
soc: mediatek: pwrap: add missing check on rstc
The variable rstc is set only when the SoC PWRAP have the PWRAP_CAP_RESET capability. Check whether rstc is set before using it to avoid errors. Signed-off-by: Fabien Parent <fparent@baylibre.com> Signed-off-by: Matthias Brugger <matthias.bgg@gmail.com>
This commit is contained in:
parent
4bad8b0709
commit
a51f4c031d
@ -1478,7 +1478,8 @@ static int pwrap_init(struct pmic_wrapper *wrp)
|
||||
{
|
||||
int ret;
|
||||
|
||||
reset_control_reset(wrp->rstc);
|
||||
if (wrp->rstc)
|
||||
reset_control_reset(wrp->rstc);
|
||||
if (wrp->rstc_bridge)
|
||||
reset_control_reset(wrp->rstc_bridge);
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user