Commit 2cd82d06 authored by Stephen Boyd's avatar Stephen Boyd

simplefb: Remove impossible check for of_clk_get_parent_count() < 0

The check for < 0 is impossible now that
of_clk_get_parent_count() returns an unsigned int. Simplify the
code and update the types.

Cc: Hans de Goede <>
Cc: Jean-Christophe Plagniol-Villard <>
Acked-by: default avatarTomi Valkeinen <>
Cc: <>
Signed-off-by: default avatarStephen Boyd <>
parent 3d755dcc
......@@ -174,7 +174,7 @@ static int simplefb_parse_pd(struct platform_device *pdev,
struct simplefb_par {
#if defined CONFIG_OF && defined CONFIG_COMMON_CLK
int clk_count;
unsigned int clk_count;
struct clk **clks;
#if defined CONFIG_OF && defined CONFIG_REGULATOR
......@@ -213,7 +213,7 @@ static int simplefb_clocks_init(struct simplefb_par *par,
return 0;
par->clk_count = of_clk_get_parent_count(np);
if (par->clk_count <= 0)
if (!par->clk_count)
return 0;
par->clks = kcalloc(par->clk_count, sizeof(struct clk *), GFP_KERNEL);
Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment