mirror of
https://github.com/BobTheBlinker/android_kernel_motorola_sm6375.git
synced 2026-10-30 19:51:31 -04:00
ptp_qoriq: fix NULL access if ptp dt node missing
Make sure ptp dt node exists before accessing it in case of NULL pointer call trace. Signed-off-by: Claudiu Manoil <[email protected]> Signed-off-by: Yangbo Lu <[email protected]> Acked-by: Richard Cochran <[email protected]> Signed-off-by: David S. Miller <[email protected]>
This commit is contained in:
parent
5f05836831
commit
7f4399ba40
1 changed files with 3 additions and 0 deletions
|
|
@ -467,6 +467,9 @@ int ptp_qoriq_init(struct ptp_qoriq *ptp_qoriq, void __iomem *base,
|
|||
unsigned long flags;
|
||||
u32 tmr_ctrl;
|
||||
|
||||
if (!node)
|
||||
return -ENODEV;
|
||||
|
||||
ptp_qoriq->base = base;
|
||||
ptp_qoriq->caps = *caps;
|
||||
|
||||
|
|
|
|||
Loading…
Reference in a new issue