* [PATCH 2/3] can: cc770: add missing free_cc770dev() in cc770_isa_probe()
@ 2022-11-11 12:09 Zhang Changzhong
2022-11-24 15:08 ` Marc Kleine-Budde
0 siblings, 1 reply; 2+ messages in thread
From: Zhang Changzhong @ 2022-11-11 12:09 UTC (permalink / raw)
To: Wolfgang Grandegger, Marc Kleine-Budde, David S. Miller,
Eric Dumazet, Jakub Kicinski, Paolo Abeni
Cc: Zhang Changzhong, linux-can, netdev, linux-kernel
Add the missing free_cc770dev() before return from cc770_isa_probe() in
the register_cc770dev() error handling case.
In addition, remove blanks before goto labels.
Fixes: 7e02e5433e00 ("can: cc770: legacy CC770 ISA bus driver")
Signed-off-by: Zhang Changzhong <zhangchangzhong@huawei.com>
---
drivers/net/can/cc770/cc770_isa.c | 10 ++++++----
1 file changed, 6 insertions(+), 4 deletions(-)
diff --git a/drivers/net/can/cc770/cc770_isa.c b/drivers/net/can/cc770/cc770_isa.c
index 194c86e..8f6dccd 100644
--- a/drivers/net/can/cc770/cc770_isa.c
+++ b/drivers/net/can/cc770/cc770_isa.c
@@ -264,22 +264,24 @@ static int cc770_isa_probe(struct platform_device *pdev)
if (err) {
dev_err(&pdev->dev,
"couldn't register device (err=%d)\n", err);
- goto exit_unmap;
+ goto exit_free;
}
dev_info(&pdev->dev, "device registered (reg_base=0x%p, irq=%d)\n",
priv->reg_base, dev->irq);
return 0;
- exit_unmap:
+exit_free:
+ free_cc770dev(dev);
+exit_unmap:
if (mem[idx])
iounmap(base);
- exit_release:
+exit_release:
if (mem[idx])
release_mem_region(mem[idx], iosize);
else
release_region(port[idx], iosize);
- exit:
+exit:
return err;
}
--
2.9.5
^ permalink raw reply related [flat|nested] 2+ messages in thread
* Re: [PATCH 2/3] can: cc770: add missing free_cc770dev() in cc770_isa_probe()
2022-11-11 12:09 [PATCH 2/3] can: cc770: add missing free_cc770dev() in cc770_isa_probe() Zhang Changzhong
@ 2022-11-24 15:08 ` Marc Kleine-Budde
0 siblings, 0 replies; 2+ messages in thread
From: Marc Kleine-Budde @ 2022-11-24 15:08 UTC (permalink / raw)
To: Zhang Changzhong
Cc: Wolfgang Grandegger, David S. Miller, Eric Dumazet,
Jakub Kicinski, Paolo Abeni, linux-can, netdev, linux-kernel
[-- Attachment #1: Type: text/plain, Size: 674 bytes --]
On 11.11.2022 20:09:16, Zhang Changzhong wrote:
> Add the missing free_cc770dev() before return from cc770_isa_probe() in
> the register_cc770dev() error handling case.
>
> In addition, remove blanks before goto labels.
>
> Fixes: 7e02e5433e00 ("can: cc770: legacy CC770 ISA bus driver")
> Signed-off-by: Zhang Changzhong <zhangchangzhong@huawei.com>
Applied to linux-can.
Thanks,
Marc
--
Pengutronix e.K. | Marc Kleine-Budde |
Embedded Linux | https://www.pengutronix.de |
Vertretung West/Dortmund | Phone: +49-231-2826-924 |
Amtsgericht Hildesheim, HRA 2686 | Fax: +49-5121-206917-5555 |
[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 488 bytes --]
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2022-11-24 15:09 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2022-11-11 12:09 [PATCH 2/3] can: cc770: add missing free_cc770dev() in cc770_isa_probe() Zhang Changzhong
2022-11-24 15:08 ` Marc Kleine-Budde
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).