提交 b5827147 编写于 作者: P Peiwei Hu 提交者: Zheng Zengkai

media: ir_toy: free before error exiting

stable inclusion
from stable-v5.10.110
commit 99e3f83539cac6884a4df02cb204a57a184ea12b
bugzilla: https://gitee.com/openeuler/kernel/issues/I574AL

Reference: https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git/commit/?id=99e3f83539cac6884a4df02cb204a57a184ea12b

--------------------------------

[ Upstream commit 52cdb013 ]

Fix leak in error path.
Signed-off-by: NPeiwei Hu <jlu.hpw@foxmail.com>
Signed-off-by: NSean Young <sean@mess.org>
Signed-off-by: NMauro Carvalho Chehab <mchehab@kernel.org>
Signed-off-by: NSasha Levin <sashal@kernel.org>
Signed-off-by: NYu Liao <liaoyu15@huawei.com>
Reviewed-by: NWei Li <liwei391@huawei.com>
Signed-off-by: NZheng Zengkai <zhengzengkai@huawei.com>
上级 1896593a
......@@ -429,7 +429,7 @@ static int irtoy_probe(struct usb_interface *intf,
err = usb_submit_urb(irtoy->urb_in, GFP_KERNEL);
if (err != 0) {
dev_err(irtoy->dev, "fail to submit in urb: %d\n", err);
return err;
goto free_rcdev;
}
err = irtoy_setup(irtoy);
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册