ptp_qoriq: fix NULL access if ptp dt node missing
Subsystems (4)
Y.b. Lu
maintainerPATCH 1/1 ptp_qoriq: fix NULL access if ptp dt node missing
From: Claudiu Manoil <[email protected]>
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]>
--- drivers/ptp/ptp_qoriq.c | 3 +++ 1 file changed, 3 insertions(+)
drivers/ptp/ptp_qoriq.c +3 -0
@@ -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;
Signature · 1 line
2.17.1
Quoted 7 lines · Y.b. Lu
From: Claudiu Manoil <[email protected]>
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]>
From: "Y.b. Lu" <[email protected]>
Date: Thu, 9 May 2019 03:07:12 +0000
Quoted 7 lines
From: Claudiu Manoil <[email protected]>
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]>
Applied, thanks.