media: ir_toy: free before error exiting
[ Upstream commit 52cdb01303
]
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>
This commit is contained in:
parent
cec06ce393
commit
93ef3fdf3b
|
@ -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);
|
||||
|
|
Loading…
Reference in New Issue