]> git.baikalelectronics.ru Git - kernel.git/commit
clk: sunxi: fix overflow when setting up divided factors
authorEmilio López <emilio@elopez.com.ar>
Sat, 25 Jan 2014 01:32:41 +0000 (22:32 -0300)
committerMike Turquette <mturquette@linaro.org>
Mon, 27 Jan 2014 20:28:23 +0000 (12:28 -0800)
commit60e24bdbcf59aae6df3f73447c8ff14f8b53ec1a
treeec8199bbfd812cf7b144d6df6c8408a34c462c48
parent0b14b8b9839f46cc3098a9e1b08feacf96d6523c
clk: sunxi: fix overflow when setting up divided factors

Currently, we are allocating space for two pointers, when we actually
may need to store three of them (two divisors plus the original clock).
Fix this, and change sizeof(type) to sizeof(*var) to keep checkpatch.pl
happy.

Reported-by: Dan Carpenter <dan.carpenter@oracle.com>
Signed-off-by: Emilio López <emilio@elopez.com.ar>
Signed-off-by: Mike Turquette <mturquette@linaro.org>
drivers/clk/sunxi/clk-sunxi.c