summaryrefslogtreecommitdiff
path: root/drivers/staging/ipack
diff options
context:
space:
mode:
authorMiguel Gómez <magomez@igalia.com>2012-06-07 08:24:51 (GMT)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>2012-06-09 15:58:02 (GMT)
commit5e4be523981c7e63873b0321dee51bd94226fc99 (patch)
tree049cb72c24dd94db9caf03c4a780f7d141960c79 /drivers/staging/ipack
parent7d3da090cdcf400178b81f851c3721e2bbb9fce9 (diff)
downloadlinux-fsl-qoriq-5e4be523981c7e63873b0321dee51bd94226fc99.tar.xz
Staging: ipack/bridges/tpci200: remove "out" label in tpci200_slot_map_space()
Remove the "out" label from tpci200_slot_map_space(), 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>
Diffstat (limited to 'drivers/staging/ipack')
-rw-r--r--drivers/staging/ipack/bridges/tpci200.c13
1 files changed, 4 insertions, 9 deletions
diff --git a/drivers/staging/ipack/bridges/tpci200.c b/drivers/staging/ipack/bridges/tpci200.c
index 68bcc55..7baa28a 100644
--- a/drivers/staging/ipack/bridges/tpci200.c
+++ b/drivers/staging/ipack/bridges/tpci200.c
@@ -626,15 +626,11 @@ static int tpci200_slot_map_space(struct ipack_device *dev,
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;
switch (space) {
case IPACK_IO_SPACE:
@@ -699,7 +695,6 @@ static int tpci200_slot_map_space(struct ipack_device *dev,
out_unlock:
mutex_unlock(&tpci200->mutex);
-out:
return res;
}