1 From 07c8b15688055d81ac8e1c8c964b9e4c302287f1 Mon Sep 17 00:00:00 2001
2 From: Stephen Boyd <sboyd@codeaurora.org>
3 Date: Mon, 22 Feb 2016 11:12:47 -0800
4 Subject: [PATCH] usb: dwc3: Remove impossible check for
5 of_clk_get_parent_count() < 0
7 The check for < 0 is impossible now that
8 of_clk_get_parent_count() returns an unsigned int. Simplify the
9 code and update the types.
11 Acked-by: Felipe Balbi <balbi@kernel.org>
12 Cc: <linux-usb@vger.kernel.org>
13 Signed-off-by: Stephen Boyd <sboyd@codeaurora.org>
14 (cherry picked from commit 3d755dcc20dd452b52532eca17da40ebbd12aee9)
16 Change-Id: Iaa38e064d801fb36c855fea51c0443840368e0d3
17 Signed-off-by: Nitheesh Sekar <nsekar@codeaurora.org>
19 drivers/usb/dwc3/dwc3-of-simple.c | 9 +++++----
20 1 file changed, 5 insertions(+), 4 deletions(-)
22 --- a/drivers/usb/dwc3/dwc3-of-simple.c
23 +++ b/drivers/usb/dwc3/dwc3-of-simple.c
24 @@ -42,6 +42,7 @@ static int dwc3_of_simple_probe(struct p
25 struct device *dev = &pdev->dev;
26 struct device_node *np = dev->of_node;
32 @@ -49,11 +50,11 @@ static int dwc3_of_simple_probe(struct p
36 - ret = of_clk_get_parent_count(np);
39 + count = of_clk_get_parent_count(np);
43 - simple->num_clocks = ret;
44 + simple->num_clocks = count;
46 simple->clks = devm_kcalloc(dev, simple->num_clocks,
47 sizeof(struct clk *), GFP_KERNEL);