diff options
author | Ryan Harkin <ryan.harkin@linaro.org> | 2015-10-16 12:13:41 +0100 |
---|---|---|
committer | Andrey Konovalov <andrey.konovalov@linaro.org> | 2015-10-16 18:50:15 +0300 |
commit | cf12114d665c65e8e1387212097297a4c756fd39 (patch) | |
tree | 92ad5557fa9b48ca7d4f3743ef626d58273d7b6e | |
parent | ac89df30d296c7c06fe51a4a2c7810d419af91a0 (diff) |
hisilicon: iic: fix "add sloving reset function"tracking-ll-fixes-for-hikey-mainline-rebase-ll-20151016.0
Patch "hisilicon: iic: add sloving reset function" prevents Juno from
booting due to referencing an uninitialised pointer:
[ 4.050860] usbcore: registered new interface driver usbfs
[ 4.056349] usbcore: registered new interface driver hub
[ 4.061717] usbcore: registered new device driver usb
[ 4.067159] Unable to handle kernel paging request at virtual address ffffffc9
[ 4.074328] pgd = ffffffc000ccf000
[ 4.077694] [ffffffc9] *pgd=0000000000000000, *pud=0000000000000000
[ 4.083911] Internal error: Oops: 96000045 [#1] PREEMPT SMP
[ 4.089426] Modules linked in:
[ 4.092456] CPU: 3 PID: 1 Comm: swapper/0 Not tainted 4.3.0-rc5
[ 4.098572] Hardware name: ARM Juno development board (r1) (DT)
[ 4.104432] task: ffffffc977cf6c00 ti: ffffffc977cf8000 task.ti: ffffffc977cf8000
[ 4.111845] PC is at dw_i2c_probe+0x210/0x544
[ 4.116159] LR is at dw_i2c_probe+0x1dc/0x544
[ 4.120471] pc : [<ffffffc000652f14>] lr : [<ffffffc000652ee0>] pstate: 80000045
[ 4.127791] sp : ffffffc977cfbbd0
[ 4.131069] x29: ffffffc977cfbbd0 x28: ffffffc000b3e630
[ 4.136336] x27: ffffffc000c58000 x26: ffffffc000af4254
[ 4.141602] x25: ffffffc000b3e6a0 x24: ffffffc977f65410
[ 4.146867] x23: ffffffc000cb6000 x22: 0000000000000001
[ 4.152133] x21: ffffffc977f65400 x20: 0000000000000000
[ 4.157399] x19: ffffffc9770d9818 x18: 0000000000000001
[ 4.162664] x17: 0000000000000000 x16: 0000000000000019
[ 4.167929] x15: fffffffffffffff8 x14: 0ffffffffffffffe
[ 4.173194] x13: 0000000000000030 x12: 0000000000000008
[ 4.178459] x11: 0000000000000030 x10: 0101010101010101
[ 4.183725] x9 : fffffffffffffffe x8 : ffffffc977f0b940
[ 4.188990] x7 : 0000000000000000 x6 : 0000000000008063
[ 4.194255] x5 : 6300000000000000 x4 : 0000000000000000
[ 4.199520] x3 : 0000000000000000 x2 : 0000000000000000
[ 4.204784] x1 : 00000000ffffffc9 x0 : 0000000000000001
This patch prevents the new code from running if the pointer has not been
initialised.
Signed-off-by: Ryan Harkin <ryan.harkin@linaro.org>
-rw-r--r-- | drivers/i2c/busses/i2c-designware-platdrv.c | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/drivers/i2c/busses/i2c-designware-platdrv.c b/drivers/i2c/busses/i2c-designware-platdrv.c index 00231e3fd660..7320b677e16d 100644 --- a/drivers/i2c/busses/i2c-designware-platdrv.c +++ b/drivers/i2c/busses/i2c-designware-platdrv.c @@ -252,7 +252,8 @@ static int dw_i2c_probe(struct platform_device *pdev) if (IS_ERR(dev->clk)) return PTR_ERR(dev->clk); - i2c_clk_domain_enable(dev, 0); + if (sctrl_base) + i2c_clk_domain_enable(dev, 0); clk_prepare_enable(dev->clk); |