aboutsummaryrefslogtreecommitdiff
path: root/drivers/serial/8250.c
diff options
context:
space:
mode:
authorLinus Torvalds <torvalds@g5.osdl.org>2006-01-18 15:19:40 -0800
committerLinus Torvalds <torvalds@g5.osdl.org>2006-01-18 15:19:40 -0800
commit2149bcabc5f6fd635935d57480044ba4c11bc020 (patch)
treed0313441c6b8b39dbf3bd840627e57af92a6b929 /drivers/serial/8250.c
parent2333f2120759bb2a3edcc0d32b2f310048ee610d (diff)
parentd9004eb466d03b7900ed432fecec6819012b4ed3 (diff)
Merge master.kernel.org:/home/rmk/linux-2.6-serial
Diffstat (limited to 'drivers/serial/8250.c')
-rw-r--r--drivers/serial/8250.c13
1 files changed, 5 insertions, 8 deletions
diff --git a/drivers/serial/8250.c b/drivers/serial/8250.c
index d9ce8c54941..bc36edff205 100644
--- a/drivers/serial/8250.c
+++ b/drivers/serial/8250.c
@@ -2595,15 +2595,11 @@ static int __init serial8250_init(void)
if (ret)
goto out;
- ret = platform_driver_register(&serial8250_isa_driver);
- if (ret)
- goto unreg_uart_drv;
-
serial8250_isa_devs = platform_device_alloc("serial8250",
PLAT8250_DEV_LEGACY);
if (!serial8250_isa_devs) {
ret = -ENOMEM;
- goto unreg_plat_drv;
+ goto unreg_uart_drv;
}
ret = platform_device_add(serial8250_isa_devs);
@@ -2612,12 +2608,13 @@ static int __init serial8250_init(void)
serial8250_register_ports(&serial8250_reg, &serial8250_isa_devs->dev);
- goto out;
+ ret = platform_driver_register(&serial8250_isa_driver);
+ if (ret == 0)
+ goto out;
+ platform_device_del(serial8250_isa_devs);
put_dev:
platform_device_put(serial8250_isa_devs);
- unreg_plat_drv:
- platform_driver_unregister(&serial8250_isa_driver);
unreg_uart_drv:
uart_unregister_driver(&serial8250_reg);
out: