summaryrefslogtreecommitdiffstats
path: root/drivers/net/wan
diff options
context:
space:
mode:
authorWen Yang <wen.yang99@zte.com.cn>2018-12-26 16:28:30 +0800
committerDavid S. Miller <davem@davemloft.net>2018-12-27 16:28:20 -0800
commit40752b3eae29f8ca2378e978a02bd6dbeeb06d16 (patch)
tree3b1ac8361545cc524bbe6bfc686f35ced71514d2 /drivers/net/wan
parent92ee77d148bf06d8c52664be4d1b862583fd5c0e (diff)
downloadlinux-40752b3eae29f8ca2378e978a02bd6dbeeb06d16.tar.gz
linux-40752b3eae29f8ca2378e978a02bd6dbeeb06d16.tar.bz2
linux-40752b3eae29f8ca2378e978a02bd6dbeeb06d16.zip
net/wan/fsl_ucc_hdlc: Avoid double free in ucc_hdlc_probe()
This patch fixes potential double frees if register_hdlc_device() fails. Signed-off-by: Wen Yang <wen.yang99@zte.com.cn> Reviewed-by: Peng Hao <peng.hao2@zte.com.cn> CC: Zhao Qiang <qiang.zhao@nxp.com> CC: "David S. Miller" <davem@davemloft.net> CC: netdev@vger.kernel.org CC: linuxppc-dev@lists.ozlabs.org CC: linux-kernel@vger.kernel.org Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'drivers/net/wan')
-rw-r--r--drivers/net/wan/fsl_ucc_hdlc.c1
1 files changed, 0 insertions, 1 deletions
diff --git a/drivers/net/wan/fsl_ucc_hdlc.c b/drivers/net/wan/fsl_ucc_hdlc.c
index 7a42336c8af8..839fa7715709 100644
--- a/drivers/net/wan/fsl_ucc_hdlc.c
+++ b/drivers/net/wan/fsl_ucc_hdlc.c
@@ -1180,7 +1180,6 @@ static int ucc_hdlc_probe(struct platform_device *pdev)
if (register_hdlc_device(dev)) {
ret = -ENOBUFS;
pr_err("ucc_hdlc: unable to register hdlc device\n");
- free_netdev(dev);
goto free_dev;
}