Skip to content

Commit

Permalink
jsm: removing the uart structure and filename on error
Browse files Browse the repository at this point in the history
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>
  • Loading branch information
Breno Leitao authored and Greg Kroah-Hartman committed Mar 2, 2010
1 parent eec9fe7 commit 54862ee
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions drivers/serial/jsm/jsm_driver.c
Original file line number Diff line number Diff line change
Expand Up @@ -179,6 +179,7 @@ static int __devinit jsm_probe_one(struct pci_dev *pdev, const struct pci_device

return 0;
out_free_irq:
jsm_remove_uart_port(brd);
free_irq(brd->irq, brd);
out_iounmap:
iounmap(brd->re_map_membase);
Expand Down

0 comments on commit 54862ee

Please sign in to comment.