Skip to content

Commit b267ec6

Browse files
Huibin HongZhengShunQian
authored andcommitted
spi: rockchip: fix bug when no high_speed pinctrl state
[ 1.644632] rockchip-spi ff190000.spi: no high_speed pinctrl state [ 1.646337] Unable to handle kernel NULL pointer dereference at virtual address 00000005 [ 1.647412] pgd = ffffff80093b9000 [ 1.647873] [00000005] *pgd=00000000feffe003, *pud=00000000feffe003, *pmd=0000000000000000 [ 1.649019] Internal error: Oops: 96000005 [#1] SMP [ 1.649643] Modules linked in: [ 1.650065] CPU: 0 PID: 1 Comm: swapper/0 Not tainted 4.4.120-rockchip-ayufan-195 #1 [ 1.651042] Hardware name: Pine64 Rock64 (DT) [ 1.651603] task: ffffffc0f5d48000 task.stack: ffffffc0f5d44000 [ 1.652366] PC is at pinctrl_select_state+0x3c/0x12c [ 1.653004] LR is at pinctrl_select_state+0x7c/0x12c [ 1.653641] pc : [<ffffff8008596840>] lr : [<ffffff8008596880>] pstate: 60000045 [ 1.654574] sp : ffffffc0f5d47420 patch from:rockchip-linux/kernel@c9dc2ab Change-Id: Ie2926a505288d7198a4d49c2abf5a4207281c89d Signed-off-by: Huibin Hong <[email protected]>
1 parent 10362a9 commit b267ec6

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

drivers/spi/spi-rockchip.c

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -777,10 +777,10 @@ static int rockchip_spi_probe(struct platform_device *pdev)
777777

778778
rs->high_speed_state = pinctrl_lookup_state(rs->dev->pins->p,
779779
"high_speed");
780-
if (IS_ERR_OR_NULL(rs->high_speed_state))
780+
if (IS_ERR_OR_NULL(rs->high_speed_state)) {
781781
dev_warn(&pdev->dev, "no high_speed pinctrl state\n");
782-
else
783782
rs->high_speed_state = NULL;
783+
}
784784

785785
ret = devm_spi_register_master(&pdev->dev, master);
786786
if (ret) {

0 commit comments

Comments
 (0)