clk: st: fix handling result of of_property_count_strings
authorAndrzej Hajda <a.hajda@samsung.com>
Thu, 24 Sep 2015 14:00:16 +0000 (16:00 +0200)
committerStephen Boyd <sboyd@codeaurora.org>
Thu, 1 Oct 2015 22:21:50 +0000 (15:21 -0700)
commita1c22a4be7983f64324e960f7ba373784c0c8289
tree92868f65de87f9b387d78f1aeb3815e0143dd71e
parent8334c0e7b983fb27e0d8788901e9621d1946ba93
clk: st: fix handling result of of_property_count_strings

The function can return negative value.

The problem has been detected using proposed semantic patch
scripts/coccinelle/tests/assign_signed_to_unsigned.cocci [1].

[1]: http://permalink.gmane.org/gmane.linux.kernel/2046107

Signed-off-by: Andrzej Hajda <a.hajda@samsung.com>
Signed-off-by: Stephen Boyd <sboyd@codeaurora.org>
drivers/clk/st/clk-flexgen.c