Skip to content

Commit 2cf5966

Browse files
changhuangliangpH5
authored andcommitted
reset: starfive: jh71x0: Fix accessing the empty member on JH7110 SoC
data->asserted will be NULL on JH7110 SoC since commit 82327b1 ("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: 82327b1 ("reset: starfive: Add StarFive JH7110 reset driver") Signed-off-by: Changhuang Liang <[email protected]> Acked-by: Hal Feng <[email protected]> Reviewed-by: Philipp Zabel <[email protected]> Link: https://lore.kernel.org/r/[email protected] Signed-off-by: Philipp Zabel <[email protected]>
1 parent e7b71bf commit 2cf5966

File tree

1 file changed

+3
-0
lines changed

1 file changed

+3
-0
lines changed

drivers/reset/starfive/reset-starfive-jh71x0.c

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -94,6 +94,9 @@ static int jh71x0_reset_status(struct reset_controller_dev *rcdev,
9494
void __iomem *reg_status = data->status + offset * sizeof(u32);
9595
u32 value = readl(reg_status);
9696

97+
if (!data->asserted)
98+
return !(value & mask);
99+
97100
return !((value ^ data->asserted[offset]) & mask);
98101
}
99102

0 commit comments

Comments
 (0)