Skip to content

clk: Return value calculated by ERR_PTR

Andrew Goodbody u-boot 2 versions – In review

Get series with b4
b4 am [email protected] change-id 20250703-clk_uclass_fix-eaf648b2ebb5

Versions newest first

  1. v2 Latest3 patches 10 repliesIn review
  2. v11 patch 6 repliesSuperseded

Changes in v2 from the cover letter

- Added 1/3 to prevent SIGSEGV on debug statement
- Added code to original patch now 2/3 to fixup sandbox code that is
needed to keep tests passing with fixed code
- Added 3/3 to prevent memory leaks on error
- Link to v1: https://lore.kernel.org/r/[email protected]

Patches in v2 No applies recorded yet

#Subject and filesSizeRepliesApplied
1/3clk: Prevent SIGSEGV on debugdrivers/clk/clk-uclass.c+2 -21 reply
2/3clk: Return value calculated by ERR_PTRarch/sandbox/include/asm/clk.h drivers/clk/clk-uclass.c drivers/clk/clk_sandbox.c +1 more+23 -40 replies
3/3clk: Prevent memory leak on errordrivers/clk/clk-uclass.c+1 -10 replies

Reviews trailers per patch

No Reviewed-by, Acked-by or Tested-by trailers for v2 yet.

Read the v2 thread

Cover letter [PATCH v2 0/3] clk: Return value calculated by ERR_PTR

Smatch reported an error where a value calculated by ERR_PTR was not used. Fixing this to return the generated value led to a test failure which meant updating the sandbox clock code so that it would still cause the tests to pass with the above correction.
Debugging this problem led to a SIGSEGV which is addressed in 1/3. Possible memory leaks noticed are addressed in 3/3.

---
Changes in v2:
- Added 1/3 to prevent SIGSEGV on debug statement
- Added code to original patch now 2/3 to fixup sandbox code that is
needed to keep tests passing with fixed code
- Added 3/3 to prevent memory leaks on error
- Link to v1: https://lore.kernel.org/r/[email protected]

---
Andrew Goodbody (3):
clk: Prevent SIGSEGV on debug
clk: Return value calculated by ERR_PTR
clk: Prevent memory leak on error

 arch/sandbox/include/asm/clk.h |  1 +
 drivers/clk/clk-uclass.c       | 10 +++++-----
 drivers/clk/clk_sandbox.c      | 17 +++++++++++++++++
 test/dm/clk.c                  |  5 +++--
 4 files changed, 26 insertions(+), 7 deletions(-)

---
base-commit: 2bc0715b558fa1ac5c88b11e250740b16a905837
change-id: 20250703-clk_uclass_fix-eaf648b2ebb5

Best regards,

Signature · 1 line
Andrew Goodbody <[email protected]>