[<prev] [next>] [day] [month] [year] [list]
Message-ID: <tencent_87FD00188928D6688137C8FA9ECB86180505@qq.com>
Date: Wed, 29 Dec 2021 09:15:18 +0800
From: Peiwei Hu <jlu.hpw@...mail.com>
To: sean@...s.org, mchehab@...nel.org
Cc: linux-media@...r.kernel.org, linux-kernel@...r.kernel.org,
trivial@...nel.org, Peiwei Hu <jlu.hpw@...mail.com>
Subject: [PATCH] media: ir_toy: free before error exiting
use goto for error handling instead of returning directly
Signed-off-by: Peiwei Hu <jlu.hpw@...mail.com>
---
drivers/media/rc/ir_toy.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
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);
--
2.25.1
Powered by blists - more mailing lists