public inbox for linux-serial@vger.kernel.org
 help / color / mirror / Atom feed
* [PATCH 1/2] jsm: removing the uart structure and filename on error
@ 2010-02-02  1:34 leitao
  2010-02-02  1:34 ` [PATCH 2/2] jsm: fixing error if the driver fails to load leitao
  2010-02-23 20:27 ` [PATCH 1/2] jsm: removing the uart structure and filename on error Breno Leitao
  0 siblings, 2 replies; 4+ messages in thread
From: leitao @ 2010-02-02  1:34 UTC (permalink / raw)
  To: linux-serial, scottk; +Cc: Breno Leitao

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>
---
 drivers/serial/jsm/jsm_driver.c |    1 +
 1 files changed, 1 insertions(+), 0 deletions(-)

diff --git a/drivers/serial/jsm/jsm_driver.c b/drivers/serial/jsm/jsm_driver.c
index 108c3e0..12cb5e4 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
 
 	return 0;
  out_free_irq:
+	jsm_remove_uart_port(brd);
 	free_irq(brd->irq, brd);
  out_iounmap:
 	iounmap(brd->re_map_membase);
-- 
1.6.0.2


^ permalink raw reply related	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2010-02-23 20:56 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2010-02-02  1:34 [PATCH 1/2] jsm: removing the uart structure and filename on error leitao
2010-02-02  1:34 ` [PATCH 2/2] jsm: fixing error if the driver fails to load leitao
2010-02-23 20:27 ` [PATCH 1/2] jsm: removing the uart structure and filename on error Breno Leitao
2010-02-23 20:56   ` Greg KH

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox