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>
long visorchipset_ioctl(struct file *file, unsigned int cmd, unsigned long arg)
{
long visorchipset_ioctl(struct file *file, unsigned int cmd, unsigned long arg)
{
s64 adjustment;
s64 vrtc_offset;
s64 adjustment;
s64 vrtc_offset;
vrtc_offset = issue_vmcall_query_guest_virtual_time_offset();
if (copy_to_user
((void __user *)arg, &vrtc_offset, sizeof(vrtc_offset))) {
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;
}
DBGINF("insde visorchipset_ioctl, cmd=%d, vrtc_offset=%lld",
cmd, vrtc_offset);
}
DBGINF("insde visorchipset_ioctl, cmd=%d, vrtc_offset=%lld",
cmd, vrtc_offset);
case VMCALL_UPDATE_PHYSICAL_TIME:
if (copy_from_user
(&adjustment, (void __user *)arg, sizeof(adjustment))) {
case VMCALL_UPDATE_PHYSICAL_TIME:
if (copy_from_user
(&adjustment, (void __user *)arg, sizeof(adjustment))) {
- rc = -EFAULT;
- goto Away;
}
DBGINF("insde visorchipset_ioctl, cmd=%d, adjustment=%lld", cmd,
adjustment);
}
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");
default:
LOGERR("visorchipset_ioctl received invalid command");
-Away:
- DBGINF("exiting %d!", rc);
- return rc;