diff options
author | xypron.glpk@gmx.de <xypron.glpk@gmx.de> | 2016-07-31 13:14:23 +0200 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2016-08-01 13:32:52 -0700 |
commit | 8c57a3a7fab4c6be2634da4084fb33dec02c8872 (patch) | |
tree | b83137227d318a506a520f6c7af1daca6c11ad3a /drivers/net/wan | |
parent | 4fb482f73703d69ce23f9ddfa1c55acdb3cf49a6 (diff) |
wan/fsl_ucc_hdlc: avoid possible NULL pointer dereference
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>
Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'drivers/net/wan')
-rw-r--r-- | drivers/net/wan/fsl_ucc_hdlc.c | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/drivers/net/wan/fsl_ucc_hdlc.c b/drivers/net/wan/fsl_ucc_hdlc.c index 2fc50ec453d0..6f044450b702 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; |