Commit 40752b3e authored by Wen Yang's avatar Wen Yang Committed by David S. Miller

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: default avatarWen Yang <>
Reviewed-by: default avatarPeng Hao <>
CC: Zhao Qiang <>
CC: "David S. Miller" <>
Signed-off-by: default avatarDavid S. Miller <>
parent 92ee77d1
......@@ -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");
goto free_dev;
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment