clk: ti: Use int to check return value from of_property_count_elems_of_size()
authorStephen Boyd <sboyd@kernel.org>
Tue, 25 Jun 2019 01:06:15 +0000 (18:06 -0700)
committerStephen Boyd <sboyd@kernel.org>
Tue, 25 Jun 2019 01:11:41 +0000 (18:11 -0700)
commit0b88bc9292515550b4f7b30ac7d7ecd80f5bc1aa
treec1ff4ae81bedbd4c7a151639f30114b943b057f4
parent0af69227ed9fc4ac62f8542e52aba98fc2c7945b
clk: ti: Use int to check return value from of_property_count_elems_of_size()

This function can return a negative number when it fails, but res->sets
is at most a u16 which can't hold that negative number. Let's store the
result into an int, ret, and then assign that to res->sets when it works
to avoid this logical impossibility.

Signed-off-by: Stephen Boyd <sboyd@kernel.org>
drivers/firmware/ti_sci.c