diff options
author | Benjamin Romer <benjamin.romer@unisys.com> | 2014-12-05 17:09:21 -0500 |
---|---|---|
committer | Greg Kroah-Hartman <gregkh@linuxfoundation.org> | 2015-01-09 17:32:35 -0800 |
commit | 2ce6cbb6b95b0955866ef8db3d3dbb9e7a0d1244 (patch) | |
tree | 0218dde6f291f7a64ec77e591742695dd263f391 /drivers/staging/unisys/visorchipset/file.c | |
parent | staging: unisys: fix CamelCase in visorchipset_mmap() (diff) | |
download | linux-dev-2ce6cbb6b95b0955866ef8db3d3dbb9e7a0d1244.tar.xz linux-dev-2ce6cbb6b95b0955866ef8db3d3dbb9e7a0d1244.zip |
staging: unisys: get rid of goto in visorchipset_ioctl()
Remove another completely unnecessary goto and just return the values
directly.
Signed-off-by: Ken Depro <kenneth.depro@unisys.com>
Signed-off-by: Benjamin Romer <benjamin.romer@unisys.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Diffstat (limited to 'drivers/staging/unisys/visorchipset/file.c')
-rw-r--r-- | drivers/staging/unisys/visorchipset/file.c | 18 |
1 files changed, 5 insertions, 13 deletions
diff --git a/drivers/staging/unisys/visorchipset/file.c b/drivers/staging/unisys/visorchipset/file.c index b82bc4a626ca..ced3fbe1dce3 100644 --- a/drivers/staging/unisys/visorchipset/file.c +++ b/drivers/staging/unisys/visorchipset/file.c @@ -166,7 +166,6 @@ visorchipset_mmap(struct file *file, struct vm_area_struct *vma) long visorchipset_ioctl(struct file *file, unsigned int cmd, unsigned long arg) { - int rc = SUCCESS; s64 adjustment; s64 vrtc_offset; @@ -177,28 +176,21 @@ long visorchipset_ioctl(struct file *file, unsigned int cmd, unsigned long arg) vrtc_offset = issue_vmcall_query_guest_virtual_time_offset(); if (copy_to_user ((void __user *)arg, &vrtc_offset, sizeof(vrtc_offset))) { - rc = -EFAULT; - goto Away; + return -EFAULT; } DBGINF("insde visorchipset_ioctl, cmd=%d, vrtc_offset=%lld", cmd, vrtc_offset); - break; + return SUCCESS; case VMCALL_UPDATE_PHYSICAL_TIME: if (copy_from_user (&adjustment, (void __user *)arg, sizeof(adjustment))) { - rc = -EFAULT; - goto Away; + return -EFAULT; } DBGINF("insde visorchipset_ioctl, cmd=%d, adjustment=%lld", cmd, adjustment); - rc = issue_vmcall_update_physical_time(adjustment); - break; + return issue_vmcall_update_physical_time(adjustment); default: LOGERR("visorchipset_ioctl received invalid command"); - rc = -EFAULT; - break; + return -EFAULT; } -Away: - DBGINF("exiting %d!", rc); - return rc; } |