Colin Ian King f6b1340dc7 clk: uniphier: Fix potential infinite loop
The for-loop iterates with a u8 loop counter i and compares this
with the loop upper limit of num_parents that is an int type.
There is a potential infinite loop if num_parents is larger than
the u8 loop counter. Fix this by making the loop counter the same
type as num_parents.  Also make num_parents an unsigned int to
match the return type of the call to clk_hw_get_num_parents.

Addresses-Coverity: ("Infinite loop")
Fixes: 734d82f4a678 ("clk: uniphier: add core support code for UniPhier clock driver")
Signed-off-by: Colin Ian King <colin.king@canonical.com>
Reviewed-by: Masahiro Yamada <masahiroy@kernel.org>
Link: https://lore.kernel.org/r/20210409090104.629722-1-colin.king@canonical.com
Signed-off-by: Stephen Boyd <sboyd@kernel.org>
2021-04-12 19:09:59 -07:00
..
2021-02-26 09:41:03 -08:00
2021-02-24 10:25:37 -08:00
2021-03-04 12:51:57 -08:00
2021-02-22 14:44:39 -08:00
2021-02-23 15:05:10 -08:00
2021-02-22 10:05:12 -08:00
2021-02-22 14:27:07 -08:00
2021-02-22 09:52:55 -08:00
2021-02-28 15:48:25 -08:00
2021-03-05 12:26:24 -08:00
2021-02-15 15:41:56 +01:00
2021-02-25 09:56:08 -08:00
2021-03-04 11:24:47 -08:00
2021-02-24 10:25:37 -08:00
2021-02-24 09:35:54 -08:00
2021-02-24 10:25:37 -08:00
2021-02-25 09:56:08 -08:00
2021-02-22 10:31:29 -08:00
2021-02-25 12:23:49 -08:00
2021-02-22 09:29:42 -08:00
2021-02-26 14:16:06 -08:00
2021-02-22 14:34:00 -08:00
2021-02-28 11:51:20 -08:00
2021-02-09 16:10:49 +01:00
2021-02-24 10:25:37 -08:00
2021-02-25 10:17:31 -08:00
2021-02-24 10:43:40 -08:00
2021-02-25 12:21:08 -08:00
2021-02-25 12:10:22 -08:00
2021-02-09 12:15:07 +01:00
2021-02-26 10:04:45 -08:00