Staging: ipack/bridges/tpci200: remove "out" label in tpci200_request_irq()
authorMiguel Gómez <magomez@igalia.com>
Thu, 7 Jun 2012 08:24:53 +0000 (10:24 +0200)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Sat, 9 Jun 2012 15:58:03 +0000 (08:58 -0700)
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@igalia.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/staging/ipack/bridges/tpci200.c

index f354b38b7fc6e8de7cdf8f5e3367aaf7f6cd6097..7616c4928c96c09774a0774d7f5f676f8a079037 100644 (file)
@@ -705,15 +705,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,
@@ -747,7 +743,6 @@ static int tpci200_request_irq(struct ipack_device *dev, int vector,
 
 out_unlock:
        mutex_unlock(&tpci200->mutex);
-out:
        return res;
 }