Linux Kernels

clk: sunxi: signedness bug in sun8i_h3_bus_gates_init()

This change “clk: sunxi: signedness bug in sun8i_h3_bus_gates_init()” (commit b1558f1) in Linux kernel is authored by Dan Carpenter <dan.carpenter [at] oracle.com> on Sat Dec 12 15:43:46 2015 +0300.

Description of "clk: sunxi: signedness bug in sun8i_h3_bus_gates_init()"

The change “clk: sunxi: signedness bug in sun8i_h3_bus_gates_init()” introduces changes as follows.

clk: sunxi: signedness bug in sun8i_h3_bus_gates_init()

"index" needs to be signed for the error handling to work.

Fixes: ab6e23a4e388 ('clk: sunxi: Add H3 clocks support')
Signed-off-by: Dan Carpenter <dan.carpenter@oracle.com>
Signed-off-by: Maxime Ripard <maxime.ripard@free-electrons.com>

Linux kernel releases containing commit b1558f1

The Linux kernel releases containing this commit are as follows.

Linux kernel code changes from "clk: sunxi: signedness bug in sun8i_h3_bus_gates_init()"

There are 2 lines of Linux source code added/deleted in this change. Code changes to Linux kernel are as follows.

 drivers/clk/sunxi/clk-sun8i-bus-gates.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
 
diff --git a/drivers/clk/sunxi/clk-sun8i-bus-gates.c b/drivers/clk/sunxi/clk-sun8i-bus-gates.c
index 7ab60c59dc8d..b8c775324a5c 100644
--- a/drivers/clk/sunxi/clk-sun8i-bus-gates.c
+++ b/drivers/clk/sunxi/clk-sun8i-bus-gates.c
@@ -40,7 +40,7 @@ static void __init sun8i_h3_bus_gates_init(struct device_node *node)
 	const __be32 *p;
 	int number, i;
 	u8 clk_bit;
-	u32 index;
+	int index;
 
 	reg = of_io_request_and_map(node, 0, of_node_full_name(node));
 	if (IS_ERR(reg))

The commit for this change in Linux stable tree is b1558f1 (patch).

Last modified: 2020/01/11 06:42