]> git.ipfire.org Git - thirdparty/u-boot.git/commitdiff
Merge patch series "clk: Fix some error detection"
authorTom Rini <trini@konsulko.com>
Thu, 4 Dec 2025 15:38:46 +0000 (09:38 -0600)
committerTom Rini <trini@konsulko.com>
Thu, 4 Dec 2025 15:38:46 +0000 (09:38 -0600)
Andrew Goodbody <andrew.goodbody@linaro.org> says:

The function clk_get_rate() returns a ulong with 0 meaning an invalid
clock rate and also negative error codes being returned for other
errors. But being an unsigned return value this cannot simply be tested
for with a < 0 test. Instead use the IS_ERR_VALUE() macro to check for
negative errors appearing as very large positive values. Fix those
places that test for <= 0. Also fix some places checking the return of
clk_register() that incorrectly used ERR_PTR().

Link: https://lore.kernel.org/r/20251021-clk_funcs-v1-0-acf51a40eea7@linaro.org

Trivial merge