Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Skip to content
Commit 2939caf5 authored by Saravana Kannan's avatar Saravana Kannan Committed by Stephen Boyd
Browse files

msm: clock-generic: Handle round rate return values greater than LONG_MAX



The return type of clk_round_rate() is long. So, technically it can return
only rates as large as LONG_MAX (~2.1 GHz). But CPU clocks can already go
past 2.1 GHz and any return value greater than LONG_MAX will appear as a
negative number to the caller.

So, make the clock-generic implementation a bit more selective/intelligent
about treating negative return values from clk_round_rate() as errors. If
the returned negative number is not one of the standard error values
(IS_ERR_VALUE), then treat the negative long number as an unsigned long
rate.

Change-Id: I27383bdb74ed6986667fee681005adec7b16bde9
Signed-off-by: default avatarSaravana Kannan <skannan@codeaurora.org>
parent 1cc8d6dc
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment