[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [Xen-changelog] [xen master] x86: remove redundant checks in sysctl.c
commit e1c10ecdf7f0a4437e631bdbf887ce4af4c03a1b Author: Yi Sun <yi.y.sun@xxxxxxxxxxxxxxx> AuthorDate: Thu Aug 31 16:07:26 2017 +0800 Commit: Wei Liu <wei.liu2@xxxxxxxxxx> CommitDate: Thu Aug 31 16:34:11 2017 +0100 x86: remove redundant checks in sysctl.c In sysctl.c, the return value of 'psr_get_info' has been checked immediately. So, it is redundant to check the return value again when copy the field to guest. Suggested-by: Roger Pau Monné <roger.pau@xxxxxxxxxx> Signed-off-by: Yi Sun <yi.y.sun@xxxxxxxxxxxxxxx> Reviewed-by: Jan Beulich <jbeulich@xxxxxxxx> Reviewed-by: Roger Pau Monné <roger.pau@xxxxxxxxxx> --- xen/arch/x86/sysctl.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/xen/arch/x86/sysctl.c b/xen/arch/x86/sysctl.c index 2bde99c..c3fdae8 100644 --- a/xen/arch/x86/sysctl.c +++ b/xen/arch/x86/sysctl.c @@ -190,7 +190,7 @@ long arch_do_sysctl( sysctl->u.psr_cat_op.u.cat_info.flags = data[PSR_INFO_IDX_CAT_FLAG]; - if ( !ret && __copy_field_to_guest(u_sysctl, sysctl, u.psr_cat_op) ) + if ( __copy_field_to_guest(u_sysctl, sysctl, u.psr_cat_op) ) ret = -EFAULT; break; } @@ -209,7 +209,7 @@ long arch_do_sysctl( sysctl->u.psr_cat_op.u.cat_info.flags = data[PSR_INFO_IDX_CAT_FLAG]; - if ( !ret && __copy_field_to_guest(u_sysctl, sysctl, u.psr_cat_op) ) + if ( __copy_field_to_guest(u_sysctl, sysctl, u.psr_cat_op) ) ret = -EFAULT; break; } -- generated by git-patchbot for /home/xen/git/xen.git#master _______________________________________________ Xen-changelog mailing list Xen-changelog@xxxxxxxxxxxxx https://lists.xenproject.org/xen-changelog
|
Lists.xenproject.org is hosted with RackSpace, monitoring our |