linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Alan Cox <alan@lxorguk.ukuu.org.uk>
To: linux-kernel@vger.kernel.org, linux-serial@vger.kernel.org,
	torvalds@linux-foundation.org
Subject: [PATCH 04/30] jsm: Fix the return variable and removing the unused retval.
Date: Tue, 24 Mar 2009 14:02:23 +0000	[thread overview]
Message-ID: <20090324140217.12735.2780.stgit@localhost.localdomain> (raw)
In-Reply-To: <20090324135930.12735.7827.stgit@localhost.localdomain>

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

As it was, the retval was never returned, so its assignments were silly.
Just consolidate everything to rc, and remove the unused retval variable.

Signed-off-by: Breno Leitao <leitao@linux.vnet.ibm.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Alan Cox <alan@etchedpixels.co.uk>
---

 drivers/serial/jsm/jsm_driver.c |    7 +++----
 1 files changed, 3 insertions(+), 4 deletions(-)


diff --git a/drivers/serial/jsm/jsm_driver.c b/drivers/serial/jsm/jsm_driver.c
index ac79cbe..e8da2f9 100644
--- a/drivers/serial/jsm/jsm_driver.c
+++ b/drivers/serial/jsm/jsm_driver.c
@@ -57,7 +57,6 @@ static int jsm_probe_one(struct pci_dev *pdev, const struct pci_device_id *ent)
 	int rc = 0;
 	struct jsm_board *brd;
 	static int adapter_count = 0;
-	int retval;
 
 	rc = pci_enable_device(pdev);
 	if (rc) {
@@ -134,7 +133,7 @@ static int jsm_probe_one(struct pci_dev *pdev, const struct pci_device_id *ent)
 	rc = jsm_tty_init(brd);
 	if (rc < 0) {
 		dev_err(&pdev->dev, "Can't init tty devices (%d)\n", rc);
-		retval = -ENXIO;
+		rc = -ENXIO;
 		goto out_free_irq;
 	}
 
@@ -142,7 +141,7 @@ static int jsm_probe_one(struct pci_dev *pdev, const struct pci_device_id *ent)
 	if (rc < 0) {
 		/* XXX: leaking all resources from jsm_tty_init here! */
 		dev_err(&pdev->dev, "Can't init uart port (%d)\n", rc);
-		retval = -ENXIO;
+		rc = -ENXIO;
 		goto out_free_irq;
 	}
 
@@ -161,7 +160,7 @@ static int jsm_probe_one(struct pci_dev *pdev, const struct pci_device_id *ent)
 		/* XXX: leaking all resources from jsm_tty_init and
 		 	jsm_uart_port_init here! */
 		dev_err(&pdev->dev, "memory allocation for flipbuf failed\n");
-		retval = -ENOMEM;
+		rc = -ENOMEM;
 		goto out_free_irq;
 	}
 


  parent reply	other threads:[~2009-03-24 14:03 UTC|newest]

Thread overview: 43+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2009-03-24 14:01 [PATCH 00/30] Serial and tty for 2.6.30 Alan Cox
2009-03-24 14:01 ` [PATCH 01/30] disallow SERIAL_8250_PNP with SERIAL_8250_CONSOLE Alan Cox
2009-03-24 15:10   ` Andrey Panin
2009-03-24 15:22     ` Alan Cox
2009-03-24 20:59       ` Matthew Garrett
2009-03-24 21:26         ` Alan Cox
2009-03-24 21:34           ` Matthew Garrett
2009-03-24 21:38             ` Alan Cox
2009-03-24 21:43               ` Matthew Garrett
2009-03-24 22:18                 ` Alan Cox
2009-03-24 22:29                   ` Matthew Garrett
2009-03-24 22:36                     ` Alan Cox
2009-03-24 22:58                       ` Matthew Garrett
2009-03-25 23:04                         ` Bjorn Helgaas
2009-03-24 14:02 ` [PATCH 02/30] 8250_pnp.c: add another Wacom tablet Alan Cox
2009-03-24 14:02 ` [PATCH 03/30] serial: Update PNP IDs Alan Cox
2009-03-24 14:02 ` Alan Cox [this message]
2009-03-24 14:02 ` [PATCH 05/30] PCI: quirks, don't mark one netmos as class other Alan Cox
2009-03-24 14:02 ` [PATCH 06/30] devpts: must release s_umount on error Alan Cox
2009-03-24 14:02 ` [PATCH 07/30] cpm_uart: fix non-console port startup bug Alan Cox
2009-03-24 14:03 ` [PATCH 08/30] Use barrier instead of cpu_relax for early blackfin boot Alan Cox
2009-03-24 14:03 ` [PATCH 09/30] blackfin: Explain why we cannot cpu_relax() in early serial code Alan Cox
2009-03-24 14:03 ` [PATCH 10/30] blackfin: BF538/9 serial uart support Alan Cox
2009-03-24 14:03 ` [PATCH 11/30] blackfin: Use unsigned long for flags with irq functions Alan Cox
2009-03-24 14:03 ` [PATCH 12/30] blackfin: Fix tty compile error in PIO mode Alan Cox
2009-03-24 14:03 ` [PATCH 13/30] Fix DMA rx ring buffer handling Alan Cox
2009-03-24 14:04 ` [PATCH 14/30] blackfin: Subtract ANOMALY_05000230 on quot Alan Cox
2009-03-24 14:04 ` [PATCH 15/30] applicom: Auto-load applicom module when device opened Alan Cox
2009-03-24 14:04 ` [PATCH 16/30] cyclades: Auto-load cyclades " Alan Cox
2009-03-24 14:04 ` [PATCH 17/30] specialix: Auto-load specialix " Alan Cox
2009-03-24 14:04 ` [PATCH 18/30] usb: Auto-load cdc_acm " Alan Cox
2009-03-24 14:05 ` [PATCH 19/30] riscom8: Auto-load riscom8 " Alan Cox
2009-03-24 14:05 ` [PATCH 20/30] rio: addition has higher precedence than ?: Alan Cox
2009-03-24 14:05 ` [PATCH 21/30] vcs: hook sysfs devices into object lifetime instead of "binding" Alan Cox
2009-03-24 14:05 ` [PATCH 22/30] jsm: define init function as __devinit Alan Cox
2009-03-24 14:05 ` [PATCH 23/30] icom: remove unused variables Alan Cox
2009-03-24 14:05 ` [PATCH 24/30] isicom: isicom kref leak fix Alan Cox
2009-03-24 14:06 ` [PATCH 25/30] tty: moxa, fix refcounting in moxa_poll_port Alan Cox
2009-03-24 14:06 ` [PATCH 26/30] mxser: remove tty_port_tty_get from mxser_check_modem_status Alan Cox
2009-03-24 14:06 ` [PATCH 27/30] ucc: Fix leaky error path Alan Cox
2009-03-24 14:06 ` [PATCH 28/30] mux: fix build problem Alan Cox
2009-03-24 14:06 ` [PATCH 29/30] 8250_pci: add support for National Instruments 843x RS232 devices Alan Cox
2009-03-24 14:07 ` [PATCH 30/30] 8250_pci: ni8420 support Alan Cox

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=20090324140217.12735.2780.stgit@localhost.localdomain \
    --to=alan@lxorguk.ukuu.org.uk \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-serial@vger.kernel.org \
    --cc=torvalds@linux-foundation.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;
as well as URLs for NNTP newsgroup(s).