mirror of
https://github.com/torvalds/linux.git
synced 2026-06-08 06:25:52 +02:00
mfd: rk808: avoid NULL pointer dereferencing when shutdown
rk808->pins maybe NULL.
Fixes: cfe40315e8 ("pinctrl: support pinctrl driver for the RK817&RK809 PMIC")
Change-Id: Ia2c25f2717498c06d0707f17d27b0a85ee23f229
Signed-off-by: Tao Huang <huangtao@rock-chips.com>
This commit is contained in:
parent
8ace8303d0
commit
bd67d49f2b
|
|
@ -797,7 +797,7 @@ static void rk817_shutdown_prepare(void)
|
|||
RK817_RTC_INT_REG,
|
||||
(0x3 << 2), (0x0 << 2));
|
||||
|
||||
if (rk808->pins->p && rk808->pins->power_off) {
|
||||
if (rk808->pins && rk808->pins->p && rk808->pins->power_off) {
|
||||
ret = regmap_update_bits(rk808->regmap,
|
||||
RK817_SYS_CFG(3),
|
||||
RK817_SLPPIN_FUNC_MSK,
|
||||
|
|
|
|||
Loading…
Reference in New Issue
Block a user