Skip to content

Commit

Permalink
media: ir_toy: free before error exiting
Browse files Browse the repository at this point in the history
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>
  • Loading branch information
PeiweiHu authored and mchehab committed Jan 24, 2022
1 parent bb8c985 commit 52cdb01
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion drivers/media/rc/ir_toy.c
Original file line number Diff line number Diff line change
Expand Up @@ -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);
Expand Down

0 comments on commit 52cdb01

Please sign in to comment.