* [PATCH 1/1] wan/fsl_ucc_hdlc: avoid possible NULL pointer dereference
@ 2016-07-31 11:14 Heinrich Schuchardt
2016-08-01 20:44 ` David Miller
0 siblings, 1 reply; 2+ messages in thread
From: Heinrich Schuchardt @ 2016-07-31 11:14 UTC (permalink / raw)
To: Zhao Qiang; +Cc: linuxppc-dev, netdev, linux-kernel, Heinrich Schuchardt
All assignments to components of priv should only
occur after the check if prif is NULL.
Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
---
drivers/net/wan/fsl_ucc_hdlc.c | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)
diff --git a/drivers/net/wan/fsl_ucc_hdlc.c b/drivers/net/wan/fsl_ucc_hdlc.c
index 2fc50ec..6f04445 100644
--- a/drivers/net/wan/fsl_ucc_hdlc.c
+++ b/drivers/net/wan/fsl_ucc_hdlc.c
@@ -862,7 +862,7 @@ static int uhdlc_suspend(struct device *dev)
static int uhdlc_resume(struct device *dev)
{
struct ucc_hdlc_private *priv = dev_get_drvdata(dev);
- struct ucc_tdm *utdm = priv->utdm;
+ struct ucc_tdm *utdm;
struct ucc_tdm_info *ut_info;
struct ucc_fast __iomem *uf_regs;
struct ucc_fast_private *uccf;
@@ -877,6 +877,7 @@ static int uhdlc_resume(struct device *dev)
if (!netif_running(priv->ndev))
return 0;
+ utdm = priv->utdm;
ut_info = priv->ut_info;
uf_info = &ut_info->uf_info;
uf_regs = priv->uf_regs;
--
2.8.1
^ permalink raw reply related [flat|nested] 2+ messages in thread
* Re: [PATCH 1/1] wan/fsl_ucc_hdlc: avoid possible NULL pointer dereference
2016-07-31 11:14 [PATCH 1/1] wan/fsl_ucc_hdlc: avoid possible NULL pointer dereference Heinrich Schuchardt
@ 2016-08-01 20:44 ` David Miller
0 siblings, 0 replies; 2+ messages in thread
From: David Miller @ 2016-08-01 20:44 UTC (permalink / raw)
To: xypron.glpk; +Cc: qiang.zhao, linuxppc-dev, netdev, linux-kernel
From: Heinrich Schuchardt <xypron.glpk@gmx.de>
Date: Sun, 31 Jul 2016 13:14:23 +0200
> All assignments to components of priv should only
> occur after the check if prif is NULL.
>
> Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Applied.
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2016-08-01 20:46 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2016-07-31 11:14 [PATCH 1/1] wan/fsl_ucc_hdlc: avoid possible NULL pointer dereference Heinrich Schuchardt
2016-08-01 20:44 ` David Miller
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).