Commit 76237ff9 authored by Arnd Bergmann's avatar Arnd Bergmann

Merge tag 'reset-fixes-for-v6.12' of git://git.pengutronix.de/pza/linux into arm/fixes

Reset controller fixes for v6.12

Fix a NULL pointer dereference in reset-starfive-jh71x0 and replace two
accidental commas at line endings with semicolons in reset-npcm.

* tag 'reset-fixes-for-v6.12' of git://git.pengutronix.de/pza/linux:
  reset: starfive: jh71x0: Fix accessing the empty member on JH7110 SoC
  reset: npcm: convert comma to semicolon

Link: https://lore.kernel.org/r/20240930165733.1541936-1-p.zabel@pengutronix.deSigned-off-by: default avatarArnd Bergmann <arnd@arndb.de>
parents b72cd67a 2cf59663
...@@ -405,8 +405,8 @@ static int npcm_rc_probe(struct platform_device *pdev) ...@@ -405,8 +405,8 @@ static int npcm_rc_probe(struct platform_device *pdev)
if (!of_property_read_u32(pdev->dev.of_node, "nuvoton,sw-reset-number", if (!of_property_read_u32(pdev->dev.of_node, "nuvoton,sw-reset-number",
&rc->sw_reset_number)) { &rc->sw_reset_number)) {
if (rc->sw_reset_number && rc->sw_reset_number < 5) { if (rc->sw_reset_number && rc->sw_reset_number < 5) {
rc->restart_nb.priority = 192, rc->restart_nb.priority = 192;
rc->restart_nb.notifier_call = npcm_rc_restart, rc->restart_nb.notifier_call = npcm_rc_restart;
ret = register_restart_handler(&rc->restart_nb); ret = register_restart_handler(&rc->restart_nb);
if (ret) if (ret)
dev_warn(&pdev->dev, "failed to register restart handler\n"); dev_warn(&pdev->dev, "failed to register restart handler\n");
......
...@@ -94,6 +94,9 @@ static int jh71x0_reset_status(struct reset_controller_dev *rcdev, ...@@ -94,6 +94,9 @@ static int jh71x0_reset_status(struct reset_controller_dev *rcdev,
void __iomem *reg_status = data->status + offset * sizeof(u32); void __iomem *reg_status = data->status + offset * sizeof(u32);
u32 value = readl(reg_status); u32 value = readl(reg_status);
if (!data->asserted)
return !(value & mask);
return !((value ^ data->asserted[offset]) & mask); return !((value ^ data->asserted[offset]) & mask);
} }
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment