* [PATCH 14/14] zorro: fix device_register() error handling
@ 2010-09-19 12:55 Vasiliy Kulikov
2010-09-30 19:41 ` Geert Uytterhoeven
0 siblings, 1 reply; 2+ messages in thread
From: Vasiliy Kulikov @ 2010-09-19 12:55 UTC (permalink / raw)
To: kernel-janitors
Cc: Geert Uytterhoeven, Roman Zippel, linux-m68k, linux-kernel
If device_register() fails then call put_device().
See comment to device_register.
Signed-off-by: Vasiliy Kulikov <segooon@gmail.com>
---
I cannot compile this driver, so it is not tested at all.
drivers/zorro/zorro.c | 2 ++
1 files changed, 2 insertions(+), 0 deletions(-)
diff --git a/drivers/zorro/zorro.c b/drivers/zorro/zorro.c
index 6455f3a..e0c2807 100644
--- a/drivers/zorro/zorro.c
+++ b/drivers/zorro/zorro.c
@@ -142,6 +142,7 @@ static int __init amiga_zorro_probe(struct platform_device *pdev)
error = device_register(&bus->dev);
if (error) {
pr_err("Zorro: Error registering zorro_bus\n");
+ put_device(&bus->dev);
kfree(bus);
return error;
}
@@ -175,6 +176,7 @@ static int __init amiga_zorro_probe(struct platform_device *pdev)
if (error) {
dev_err(&bus->dev, "Error registering device %s\n",
z->name);
+ put_device(&z->dev);
continue;
}
error = zorro_create_sysfs_dev_files(z);
--
1.7.0.4
^ permalink raw reply related [flat|nested] 2+ messages in thread
* Re: [PATCH 14/14] zorro: fix device_register() error handling
2010-09-19 12:55 [PATCH 14/14] zorro: fix device_register() error handling Vasiliy Kulikov
@ 2010-09-30 19:41 ` Geert Uytterhoeven
0 siblings, 0 replies; 2+ messages in thread
From: Geert Uytterhoeven @ 2010-09-30 19:41 UTC (permalink / raw)
To: Vasiliy Kulikov; +Cc: kernel-janitors, Roman Zippel, linux-m68k, linux-kernel
On Sun, Sep 19, 2010 at 14:55, Vasiliy Kulikov <segooon@gmail.com> wrote:
> If device_register() fails then call put_device().
> See comment to device_register.
>
> Signed-off-by: Vasiliy Kulikov <segooon@gmail.com>
Thanks, applied to m68k tree, queued for 2.6.37.
> ---
> I cannot compile this driver, so it is not tested at all.
>
> drivers/zorro/zorro.c | 2 ++
> 1 files changed, 2 insertions(+), 0 deletions(-)
>
> diff --git a/drivers/zorro/zorro.c b/drivers/zorro/zorro.c
> index 6455f3a..e0c2807 100644
> --- a/drivers/zorro/zorro.c
> +++ b/drivers/zorro/zorro.c
> @@ -142,6 +142,7 @@ static int __init amiga_zorro_probe(struct platform_device *pdev)
> error = device_register(&bus->dev);
> if (error) {
> pr_err("Zorro: Error registering zorro_bus\n");
> + put_device(&bus->dev);
> kfree(bus);
> return error;
> }
> @@ -175,6 +176,7 @@ static int __init amiga_zorro_probe(struct platform_device *pdev)
> if (error) {
> dev_err(&bus->dev, "Error registering device %s\n",
> z->name);
> + put_device(&z->dev);
> continue;
> }
> error = zorro_create_sysfs_dev_files(z);
> --
> 1.7.0.4
Gr{oetje,eeting}s,
Geert
--
Geert Uytterhoeven -- There's lots of Linux beyond ia32 -- geert@linux-m68k.org
In personal conversations with technical people, I call myself a hacker. But
when I'm talking to journalists I just say "programmer" or something like that.
-- Linus Torvalds
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2010-09-30 19:41 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2010-09-19 12:55 [PATCH 14/14] zorro: fix device_register() error handling Vasiliy Kulikov
2010-09-30 19:41 ` Geert Uytterhoeven
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox