projects
/
platform
/
kernel
/
linux-starfive.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
4bad8b0
)
soc: mediatek: pwrap: add missing check on rstc
author
Fabien Parent
<fparent@baylibre.com>
Sat, 23 Mar 2019 21:15:52 +0000
(22:15 +0100)
committer
Matthias Brugger
<matthias.bgg@gmail.com>
Fri, 12 Apr 2019 17:42:41 +0000
(19:42 +0200)
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>
drivers/soc/mediatek/mtk-pmic-wrap.c
patch
|
blob
|
history
diff --git
a/drivers/soc/mediatek/mtk-pmic-wrap.c
b/drivers/soc/mediatek/mtk-pmic-wrap.c
index
8236a6c
..
b3ba230
100644
(file)
--- a/
drivers/soc/mediatek/mtk-pmic-wrap.c
+++ b/
drivers/soc/mediatek/mtk-pmic-wrap.c
@@
-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);