aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/serial/jsm
diff options
context:
space:
mode:
authorBreno Leitao <leitao@linux.vnet.ibm.com>2010-02-25 13:31:49 -0500
committerGreg Kroah-Hartman <gregkh@suse.de>2010-03-02 17:43:24 -0500
commit54862ee005943d0fdb13d4e54220f234676e05f5 (patch)
treee72f8fdd0617a002f48128419793e5e228b75bf0 /drivers/serial/jsm
parenteec9fe7d1ab4a0dfac4cb43047a7657fffd0002f (diff)
jsm: removing the uart structure and filename on error
If jsm fails to load, then remove the uart stuff, otherwise, the things (as files), will be there forever (even when the module is unloaded). If you try to reload the module, the following message appears: kobject_add_internal failed for ttyn1 with -EEXIST, don't try to register things with the same name in the same directory. This patch remove the uart things when the driver fails. Signed-off-by: Breno Leitao <leitao@linux.vnet.ibm.com> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
Diffstat (limited to 'drivers/serial/jsm')
-rw-r--r--drivers/serial/jsm/jsm_driver.c1
1 files changed, 1 insertions, 0 deletions
diff --git a/drivers/serial/jsm/jsm_driver.c b/drivers/serial/jsm/jsm_driver.c
index 108c3e0471fd..12cb5e446a4f 100644
--- a/drivers/serial/jsm/jsm_driver.c
+++ b/drivers/serial/jsm/jsm_driver.c
@@ -179,6 +179,7 @@ static int __devinit jsm_probe_one(struct pci_dev *pdev, const struct pci_device
179 179
180 return 0; 180 return 0;
181 out_free_irq: 181 out_free_irq:
182 jsm_remove_uart_port(brd);
182 free_irq(brd->irq, brd); 183 free_irq(brd->irq, brd);
183 out_iounmap: 184 out_iounmap:
184 iounmap(brd->re_map_membase); 185 iounmap(brd->re_map_membase);