[PATCH 4/9] Staging: ipack/bridges/tpci200: remove "out" label in tpci200_request_irq()

From: Miguel GÃmez
Date: Thu Jun 07 2012 - 04:28:14 EST


Remove the "out" label from tpci200_request_irq(), as it can directly return
the error code instead of jumping.

Signed-off-by: Miguel GÃmez <magomez@xxxxxxxxxx>
---
drivers/staging/ipack/bridges/tpci200.c | 13 ++++---------
1 file changed, 4 insertions(+), 9 deletions(-)

diff --git a/drivers/staging/ipack/bridges/tpci200.c b/drivers/staging/ipack/bridges/tpci200.c
index 216c6df..29c91d6 100644
--- a/drivers/staging/ipack/bridges/tpci200.c
+++ b/drivers/staging/ipack/bridges/tpci200.c
@@ -704,15 +704,11 @@ static int tpci200_request_irq(struct ipack_device *dev, int vector,
struct tpci200_board *tpci200;

tpci200 = check_slot(dev);
- if (tpci200 == NULL) {
- res = -EINVAL;
- goto out;
- }
+ if (tpci200 == NULL)
+ return -EINVAL;

- if (mutex_lock_interruptible(&tpci200->mutex)) {
- res = -ERESTARTSYS;
- goto out;
- }
+ if (mutex_lock_interruptible(&tpci200->mutex))
+ return -ERESTARTSYS;

if (tpci200->slots[dev->slot].irq != NULL) {
dev_err(&dev->dev,
@@ -746,7 +742,6 @@ static int tpci200_request_irq(struct ipack_device *dev, int vector,

out_unlock:
mutex_unlock(&tpci200->mutex);
-out:
return res;
}

--
1.7.9.5

--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/