Re: [PATCH] net: macb: fix ignored return value of clk_prepare_enable() in runtime resume
From: Gustavo Kenji
Date: Sun May 31 2026 - 11:43:29 EST
Hi Théo,
Thanks for the review.
> Your CC list is lacking some net maintainers, how did you get who to
> send this email to?
You're right, and I apologize. I did run get_maintainer.pl, but I made a
mistake assembling the --to/--cc lists and dropped the networking
maintainers. The full output is:
Théo Lebrun <theo.lebrun@xxxxxxxxxxx> (macb maintainer)
Conor Dooley <conor.dooley@xxxxxxxxxxxxx> (reviewer)
Andrew Lunn <andrew+netdev@xxxxxxx> (netdev)
David S. Miller <davem@xxxxxxxxxxxxx>
Eric Dumazet <edumazet@xxxxxxxxxx>
Jakub Kicinski <kuba@xxxxxxxxxx>
Paolo Abeni <pabeni@xxxxxxxxxx>
netdev@xxxxxxxxxxxxxxx
linux-kernel@xxxxxxxxxxxxxxx
I'll Cc all of them in v2.
> Could you point out if this was figured out to address a bug or if it
> is only a theoretical defense?
It is not tied to an observed failure. I found it by code review and I do
not have macb hardware to test on, so this is a robustness fix rather
than a bug fix: clk_prepare_enable() is __must_check, and here its return
value is silently discarded in the runtime-resume path. If you feel this
isn't worth changing, I'm fine with dropping the patch.
> "atomically" usually refers to some locking mechanism [...]
That was a poor word choice on my part; there is no locking involved. I
meant only that clk_bulk_prepare_enable() enables the clocks as a group
and, on failure, unwinds the ones it already enabled. I've dropped
"atomically" and reworded the commit message in v2.
Thanks,
Gustavo