On 2/5/2024 3:25 PM, Dan Carpenter wrote:
On Sat, Feb 03, 2024 at 07:01:54AM +0800, Yang Xiwen via B4 Relay wrote:
From: Yang Xiwen <forbidden...@outlook.com>

clk_get_rate() return -ve on error, not 0. Fix it by replacing judging
NULL with IS_ERR_VALUE().
   ^^^^

s/NULL/zero/.

I'd be surprised if clk_get_rate() *never* returns zero.  The Linux
kernel's clk_get_rate() function returns zero and not error codes, btw.
Yes, it's really surprising. U-Boot clk APIs are a little different from Linux kernel's. Sadly it's a bit too late to fix it since there are really plenty of existing users. Maybe we need to put some hints in the docs.
regards,
dan carpenter



--
Regards,
Yang Xiwen

Reply via email to