summaryrefslogtreecommitdiff
path: root/drivers/media
diff options
context:
space:
mode:
authorPeiwei Hu <jlu.hpw@foxmail.com>2021-12-29 04:15:18 +0300
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>2022-04-08 15:23:59 +0300
commit2011363c196846c083649c91ed30aeef64358d52 (patch)
tree7a0f99c96cf261b959fcd5f2fec95eb5861c999e /drivers/media
parent0b23130426349ee34774e425ab78e11881ccd1c1 (diff)
downloadlinux-2011363c196846c083649c91ed30aeef64358d52.tar.xz
media: ir_toy: free before error exiting
[ Upstream commit 52cdb013036391d9d87aba5b4fc49cdfc6ea4b23 ] Fix leak in error path. Signed-off-by: Peiwei Hu <jlu.hpw@foxmail.com> Signed-off-by: Sean Young <sean@mess.org> Signed-off-by: Mauro Carvalho Chehab <mchehab@kernel.org> Signed-off-by: Sasha Levin <sashal@kernel.org>
Diffstat (limited to 'drivers/media')
-rw-r--r--drivers/media/rc/ir_toy.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/media/rc/ir_toy.c b/drivers/media/rc/ir_toy.c
index 1aa7989e756c..7f394277478b 100644
--- a/drivers/media/rc/ir_toy.c
+++ b/drivers/media/rc/ir_toy.c
@@ -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);