mailbox: rk3368: fix error setting if mbox_msg is null
authorXu Jianqun <jay.xu@rock-chips.com>
Thu, 4 May 2017 03:16:52 +0000 (11:16 +0800)
committerHuang, Tao <huangtao@rock-chips.com>
Mon, 8 May 2017 07:46:26 +0000 (15:46 +0800)
commitf111309c6a051f3fa6b48f9f5e372faba118b601
tree0d1a9a374383221acb0e52de44ab7c6a908c6c3e
parente759aa4172306f1e1bd89dd0275b4c014f03cfed
mailbox: rk3368: fix error setting if mbox_msg is null

Fix the error dump:

[19252.682822] Unable to handle kernel NULL pointer dereference at
virtual address 00000020
[19252.682834] pgd = ffffff800935d000
[19252.682844] [00000020] *pgd=0000000077ffe003, *pud=0000000077ffe003,
*pmd=0000000000000000
[19252.682852] Internal error: Oops: 96000005 [#1] PREEMPT SMP
[19252.682863] Modules linked in: pvrsrvkm(O)
[19252.682872] CPU: 1 PID: 59 Comm: irq/32-ff6b0000 Tainted: G        W
O    4.4.55 #34
[19252.682875] Hardware name: Rockchip rk3368 p9 board (DT)
[19252.682880] task: ffffffc074cf8c40 ti: ffffffc074d04000 task.ti:
ffffffc074d04000
[19252.682894] PC is at mbox_chan_received_data+0xc/0x20
[19252.682901] LR is at rk3368_mbox_isr+0xb0/0xd0

Change-Id: I1873d6a7e7d1390d2c2c44a77c120d1a02614fdc
Signed-off-by: Xu Jianqun <jay.xu@rock-chips.com>
drivers/mailbox/rk3368-mailbox.c