Commit e713abea authored by Breno Leitao's avatar Breno Leitao Committed by Linus Torvalds

jsm: Fix the return variable and removing the unused retval.

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: default avatarBreno Leitao <leitao@linux.vnet.ibm.com>
Signed-off-by: default avatarAndrew Morton <akpm@linux-foundation.org>
Signed-off-by: default avatarAlan Cox <alan@etchedpixels.co.uk>
Signed-off-by: default avatarLinus Torvalds <torvalds@linux-foundation.org>
parent aacf17ad
...@@ -57,7 +57,6 @@ static int __devinit jsm_probe_one(struct pci_dev *pdev, const struct pci_device ...@@ -57,7 +57,6 @@ static int __devinit jsm_probe_one(struct pci_dev *pdev, const struct pci_device
int rc = 0; int rc = 0;
struct jsm_board *brd; struct jsm_board *brd;
static int adapter_count = 0; static int adapter_count = 0;
int retval;
rc = pci_enable_device(pdev); rc = pci_enable_device(pdev);
if (rc) { if (rc) {
...@@ -134,7 +133,7 @@ static int __devinit jsm_probe_one(struct pci_dev *pdev, const struct pci_device ...@@ -134,7 +133,7 @@ static int __devinit jsm_probe_one(struct pci_dev *pdev, const struct pci_device
rc = jsm_tty_init(brd); rc = jsm_tty_init(brd);
if (rc < 0) { if (rc < 0) {
dev_err(&pdev->dev, "Can't init tty devices (%d)\n", rc); dev_err(&pdev->dev, "Can't init tty devices (%d)\n", rc);
retval = -ENXIO; rc = -ENXIO;
goto out_free_irq; goto out_free_irq;
} }
...@@ -142,7 +141,7 @@ static int __devinit jsm_probe_one(struct pci_dev *pdev, const struct pci_device ...@@ -142,7 +141,7 @@ static int __devinit jsm_probe_one(struct pci_dev *pdev, const struct pci_device
if (rc < 0) { if (rc < 0) {
/* XXX: leaking all resources from jsm_tty_init here! */ /* XXX: leaking all resources from jsm_tty_init here! */
dev_err(&pdev->dev, "Can't init uart port (%d)\n", rc); dev_err(&pdev->dev, "Can't init uart port (%d)\n", rc);
retval = -ENXIO; rc = -ENXIO;
goto out_free_irq; goto out_free_irq;
} }
...@@ -161,7 +160,7 @@ static int __devinit jsm_probe_one(struct pci_dev *pdev, const struct pci_device ...@@ -161,7 +160,7 @@ static int __devinit jsm_probe_one(struct pci_dev *pdev, const struct pci_device
/* XXX: leaking all resources from jsm_tty_init and /* XXX: leaking all resources from jsm_tty_init and
jsm_uart_port_init here! */ jsm_uart_port_init here! */
dev_err(&pdev->dev, "memory allocation for flipbuf failed\n"); dev_err(&pdev->dev, "memory allocation for flipbuf failed\n");
retval = -ENOMEM; rc = -ENOMEM;
goto out_free_irq; goto out_free_irq;
} }
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment