diff options
author | Breno Leitao <leitao@linux.vnet.ibm.com> | 2009-04-06 12:34:27 -0400 |
---|---|---|
committer | Linus Torvalds <torvalds@linux-foundation.org> | 2009-04-06 17:36:34 -0400 |
commit | e713abead3324f6d4381a3d280b7ce35b7eadb7a (patch) | |
tree | 000f4528ab72a37606b58b1d76e0bfa0ea4ecf84 /drivers/serial/jsm | |
parent | aacf17adc62650fa0eb59559b737f543d003575e (diff) |
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: 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>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Diffstat (limited to 'drivers/serial/jsm')
-rw-r--r-- | 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 576aafb6d013..d2d32a198629 100644 --- a/drivers/serial/jsm/jsm_driver.c +++ b/drivers/serial/jsm/jsm_driver.c | |||
@@ -57,7 +57,6 @@ static int __devinit jsm_probe_one(struct pci_dev *pdev, const struct pci_device | |||
57 | int rc = 0; | 57 | int rc = 0; |
58 | struct jsm_board *brd; | 58 | struct jsm_board *brd; |
59 | static int adapter_count = 0; | 59 | static int adapter_count = 0; |
60 | int retval; | ||
61 | 60 | ||
62 | rc = pci_enable_device(pdev); | 61 | rc = pci_enable_device(pdev); |
63 | if (rc) { | 62 | if (rc) { |
@@ -134,7 +133,7 @@ static int __devinit jsm_probe_one(struct pci_dev *pdev, const struct pci_device | |||
134 | rc = jsm_tty_init(brd); | 133 | rc = jsm_tty_init(brd); |
135 | if (rc < 0) { | 134 | if (rc < 0) { |
136 | dev_err(&pdev->dev, "Can't init tty devices (%d)\n", rc); | 135 | dev_err(&pdev->dev, "Can't init tty devices (%d)\n", rc); |
137 | retval = -ENXIO; | 136 | rc = -ENXIO; |
138 | goto out_free_irq; | 137 | goto out_free_irq; |
139 | } | 138 | } |
140 | 139 | ||
@@ -142,7 +141,7 @@ static int __devinit jsm_probe_one(struct pci_dev *pdev, const struct pci_device | |||
142 | if (rc < 0) { | 141 | if (rc < 0) { |
143 | /* XXX: leaking all resources from jsm_tty_init here! */ | 142 | /* XXX: leaking all resources from jsm_tty_init here! */ |
144 | dev_err(&pdev->dev, "Can't init uart port (%d)\n", rc); | 143 | dev_err(&pdev->dev, "Can't init uart port (%d)\n", rc); |
145 | retval = -ENXIO; | 144 | rc = -ENXIO; |
146 | goto out_free_irq; | 145 | goto out_free_irq; |
147 | } | 146 | } |
148 | 147 | ||
@@ -161,7 +160,7 @@ static int __devinit jsm_probe_one(struct pci_dev *pdev, const struct pci_device | |||
161 | /* XXX: leaking all resources from jsm_tty_init and | 160 | /* XXX: leaking all resources from jsm_tty_init and |
162 | jsm_uart_port_init here! */ | 161 | jsm_uart_port_init here! */ |
163 | dev_err(&pdev->dev, "memory allocation for flipbuf failed\n"); | 162 | dev_err(&pdev->dev, "memory allocation for flipbuf failed\n"); |
164 | retval = -ENOMEM; | 163 | rc = -ENOMEM; |
165 | goto out_free_irq; | 164 | goto out_free_irq; |
166 | } | 165 | } |
167 | 166 | ||