提交 54862ee0 编写于 作者: B Breno Leitao 提交者: Greg Kroah-Hartman

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: NBreno Leitao <leitao@linux.vnet.ibm.com>
Signed-off-by: NGreg Kroah-Hartman <gregkh@suse.de>
上级 eec9fe7d
......@@ -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);
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册