public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
From: Greg Kroah-Hartman <gregkh@suse.de>
To: linux-kernel@vger.kernel.org
Cc: Breno Leitao <leitao@linux.vnet.ibm.com>,
	Greg Kroah-Hartman <gregkh@suse.de>
Subject: [PATCH 35/36] jsm: removing the uart structure and filename on error
Date: Tue,  2 Mar 2010 15:36:42 -0800	[thread overview]
Message-ID: <1267573003-782-35-git-send-email-gregkh@suse.de> (raw)
In-Reply-To: <20100302230956.GC32287@kroah.com>

From: Breno Leitao <leitao@linux.vnet.ibm.com>

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>
---
 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.7.0.1


  parent reply	other threads:[~2010-03-02 23:37 UTC|newest]

Thread overview: 37+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2010-03-02 23:09 [GIT PATCH] TTY patches for 2.6.33-git Greg KH
2010-03-02 23:36 ` [PATCH 01/36] serial: fit blackfin uart over sport driver into common uart infrastructure Greg Kroah-Hartman
2010-03-02 23:36 ` [PATCH 02/36] serial: copy UART properties of UPF_FIXED_TYPE ports provisioned using early_serial_setup Greg Kroah-Hartman
2010-03-02 23:36 ` [PATCH 03/36] serial: 68328serial.c: remove BAUD_TABLE_SIZE macro Greg Kroah-Hartman
2010-03-02 23:36 ` [PATCH 04/36] serial: atmel_serial: add poll_get_char and poll_put_char uart_ops Greg Kroah-Hartman
2010-03-02 23:36 ` [PATCH 05/36] serial: synclink_gt: dropped transmit data bugfix Greg Kroah-Hartman
2010-03-02 23:36 ` [PATCH 06/36] serial: 8250_pci: add support for MCS9865 / SYBA 6x Serial Port Card Greg Kroah-Hartman
2010-03-02 23:36 ` [PATCH 07/36] serial: imx: fix NULL dereference Oops when pdata == NULL Greg Kroah-Hartman
2010-03-02 23:36 ` [PATCH 08/36] serial: add support for Korenix JetCard Greg Kroah-Hartman
2010-03-02 23:36 ` [PATCH 09/36] serial: fix test of unsigned Greg Kroah-Hartman
2010-03-02 23:36 ` [PATCH 10/36] serial: Char: cyclades, fix compiler warning Greg Kroah-Hartman
2010-03-02 23:36 ` [PATCH 11/36] serial: cyclades: allow overriding ISA defaults also when the driver is built-in Greg Kroah-Hartman
2010-03-02 23:36 ` [PATCH 12/36] tty: char: mxser, remove unnecessary tty test Greg Kroah-Hartman
2010-03-02 23:36 ` [PATCH 13/36] serial: isicom.c: use pr_fmt and pr_<level> Greg Kroah-Hartman
2010-03-02 23:36 ` [PATCH 14/36] hvc_console: fix test on unsigned in hvc_console_print() Greg Kroah-Hartman
2010-03-02 23:36 ` [PATCH 15/36] tty: moxa: remove #ifdef MODULE completely Greg Kroah-Hartman
2010-03-02 23:36 ` [PATCH 16/36] ip2: remove #ifdef MODULE from ip2main.c Greg Kroah-Hartman
2010-03-02 23:36 ` [PATCH 17/36] ip2: Add module parameter Greg Kroah-Hartman
2010-03-02 23:36 ` [PATCH 18/36] tty: declare MODULE_FIRMWARE in various drivers Greg Kroah-Hartman
2010-03-02 23:36 ` [PATCH 19/36] Char: synclink, remove unnecessary checks Greg Kroah-Hartman
2010-03-02 23:36 ` [PATCH 20/36] serial: bfin_5xx: remove useless gpio handling with hard flow control Greg Kroah-Hartman
2010-03-02 23:36 ` [PATCH 21/36] serial: bfin_5xx: need to disable DMA TX interrupt too Greg Kroah-Hartman
2010-03-02 23:36 ` [PATCH 22/36] serial: bfin_5xx: kgdboc should accept gdb break only when it is active Greg Kroah-Hartman
2010-03-02 23:36 ` [PATCH 23/36] serial: bfin_5xx: pull in linux/io.h for ioremap prototypes Greg Kroah-Hartman
2010-03-02 23:36 ` [PATCH 24/36] serial: bcm63xx_uart: don't use kfree() on non kmalloced area Greg Kroah-Hartman
2010-03-02 23:36 ` [PATCH 25/36] serial: bcm63xx_uart: allow more than one uart to be registered Greg Kroah-Hartman
2010-03-02 23:36 ` [PATCH 26/36] sdio_uart: Use kfifo instead of the messy circ stuff Greg Kroah-Hartman
2010-03-02 23:36 ` [PATCH 27/36] nozomi: Add tty_port usage Greg Kroah-Hartman
2010-03-02 23:36 ` [PATCH 28/36] nozomi: Fix mutex handling Greg Kroah-Hartman
2010-03-02 23:36 ` [PATCH 29/36] nozomi: Tidy up the PCI table Greg Kroah-Hartman
2010-03-02 23:36 ` [PATCH 30/36] serial: timberdale: Remove dependancies Greg Kroah-Hartman
2010-03-02 23:36 ` [PATCH 31/36] tty: Fix the ldisc hangup race Greg Kroah-Hartman
2010-03-02 23:36 ` [PATCH 32/36] tty: Fix up char drivers request_room usage Greg Kroah-Hartman
2010-03-02 23:36 ` [PATCH 33/36] tty: Keep the default buffering to sub-page units Greg Kroah-Hartman
2010-03-02 23:36 ` [PATCH 34/36] tty: Add a new VT mode which is like VT_PROCESS but doesn't require a VT_RELDISP ioctl call Greg Kroah-Hartman
2010-03-02 23:36 ` Greg Kroah-Hartman [this message]
2010-03-02 23:36 ` [PATCH 36/36] jsm: fixing error if the driver fails to load Greg Kroah-Hartman

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=1267573003-782-35-git-send-email-gregkh@suse.de \
    --to=gregkh@suse.de \
    --cc=leitao@linux.vnet.ibm.com \
    --cc=linux-kernel@vger.kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox