reset: starfive: jh71x0: Fix accessing the empty member on JH7110 SoC
data->asserted will be NULL on JH7110 SoC since commit82327b127d
("reset: starfive: Add StarFive JH7110 reset driver") was added. Add the judgment condition to avoid errors when calling reset_control_status on JH7110 SoC. Fixes:82327b127d
("reset: starfive: Add StarFive JH7110 reset driver") Signed-off-by: Changhuang Liang <changhuang.liang@starfivetech.com> Acked-by: Hal Feng <hal.feng@starfivetech.com> Reviewed-by: Philipp Zabel <p.zabel@pengutronix.de> Link: https://lore.kernel.org/r/20240925112442.1732416-1-changhuang.liang@starfivetech.com Signed-off-by: Philipp Zabel <p.zabel@pengutronix.de>
This commit is contained in:
parent
e7b71bf181
commit
2cf5966366
@ -94,6 +94,9 @@ static int jh71x0_reset_status(struct reset_controller_dev *rcdev,
|
||||
void __iomem *reg_status = data->status + offset * sizeof(u32);
|
||||
u32 value = readl(reg_status);
|
||||
|
||||
if (!data->asserted)
|
||||
return !(value & mask);
|
||||
|
||||
return !((value ^ data->asserted[offset]) & mask);
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user