c90bbb521361ebb36011ec0722e7187d94dc9bff
[openwrt/openwrt.git] / target / linux / sunxi / patches-4.4 / 135-clk-sunxi-fix-signedness-bug.patch
1 From b1558f168f4ef5956913d73fe330c4da85c74349 Mon Sep 17 00:00:00 2001
2 From: Dan Carpenter <dan.carpenter@oracle.com>
3 Date: Sat, 12 Dec 2015 15:43:46 +0300
4 Subject: [PATCH] clk: sunxi: signedness bug in sun8i_h3_bus_gates_init()
5
6 "index" needs to be signed for the error handling to work.
7
8 Fixes: ab6e23a4e388 ('clk: sunxi: Add H3 clocks support')
9 Signed-off-by: Dan Carpenter <dan.carpenter@oracle.com>
10 Signed-off-by: Maxime Ripard <maxime.ripard@free-electrons.com>
11 ---
12 drivers/clk/sunxi/clk-sun8i-bus-gates.c | 2 +-
13 1 file changed, 1 insertion(+), 1 deletion(-)
14
15 diff --git a/drivers/clk/sunxi/clk-sun8i-bus-gates.c b/drivers/clk/sunxi/clk-sun8i-bus-gates.c
16 index 7ab60c5..b8c7753 100644
17 --- a/drivers/clk/sunxi/clk-sun8i-bus-gates.c
18 +++ b/drivers/clk/sunxi/clk-sun8i-bus-gates.c
19 @@ -40,7 +40,7 @@ static void __init sun8i_h3_bus_gates_init(struct device_node *node)
20 const __be32 *p;
21 int number, i;
22 u8 clk_bit;
23 - u32 index;
24 + int index;
25
26 reg = of_io_request_and_map(node, 0, of_node_full_name(node));
27 if (IS_ERR(reg))