Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux
1
fork

Configure Feed

Select the types of activity you want to include in your feed.

clk: renesas: cpg-mssr: Unlock before reset verification

Move spin_unlock_irqrestore() before verifying the reset result and
printing errors. The verification condition only uses local variables
and does not require locking.

Reported-by: Pavel Machek <pavel@nabladev.com>
Closes: https://lore.kernel.org/all/aVujAQJSDn6WyORK@duo.ucw.cz/
Signed-off-by: Lad Prabhakar <prabhakar.mahadev-lad.rj@bp.renesas.com>
Reviewed-by: Geert Uytterhoeven <geert+renesas@glider.be>
Link: https://patch.msgid.link/20260105140625.2590685-1-prabhakar.mahadev-lad.rj@bp.renesas.com
Signed-off-by: Geert Uytterhoeven <geert+renesas@glider.be>

authored by

Lad Prabhakar and committed by
Geert Uytterhoeven
cda6a5de c2922664

+5 -5
+5 -5
drivers/clk/renesas/renesas-cpg-mssr.c
··· 794 794 795 795 /* Verify the operation */ 796 796 val = readl(reg_addr); 797 - if (set == !(bitmask & val)) { 798 - dev_err(priv->dev, "Reset register %u%02u operation failed\n", reg, bit); 799 - spin_unlock_irqrestore(&priv->pub.rmw_lock, flags); 800 - return -EIO; 801 - } 802 797 803 798 spin_unlock_irqrestore(&priv->pub.rmw_lock, flags); 799 + 800 + if (set == !(bitmask & val)) { 801 + dev_err(priv->dev, "Reset register %u%02u operation failed\n", reg, bit); 802 + return -EIO; 803 + } 804 804 805 805 return 0; 806 806 }