summary refs log tree commit diff
path: root/drivers/media/rc
diff options
context:
space:
mode:
authorPeiwei Hu <jlu.hpw@foxmail.com>2021-12-29 02:15:18 +0100
committerMauro Carvalho Chehab <mchehab@kernel.org>2022-01-24 01:35:35 +0100
commit52cdb013036391d9d87aba5b4fc49cdfc6ea4b23 (patch)
tree2ba2fa8adfad6d73d37abd33394771e45e3ac2fb /drivers/media/rc
parentbb8c98537ac8af0596c00595d8800a84a1df10e7 (diff)
downloadlinux-52cdb013036391d9d87aba5b4fc49cdfc6ea4b23.tar.gz
media: ir_toy: free before error exiting
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>
Diffstat (limited to 'drivers/media/rc')
-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 7e98e7e3aace..196806709259 100644
--- a/drivers/media/rc/ir_toy.c
+++ b/drivers/media/rc/ir_toy.c
@@ -458,7 +458,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);