From: Paolo Bonzini <pbonzini@redhat.com>
To: Colin King <colin.king@canonical.com>, kvm@vger.kernel.org
Cc: kernel-janitors@vger.kernel.org, linux-kernel@vger.kernel.org
Subject: Re: [PATCH] KVM: remove redundant assignment to variable r
Date: Wed, 15 Apr 2020 16:56:46 +0200 [thread overview]
Message-ID: <6d66cb24-b517-1bc3-15c3-9b302215febf@redhat.com> (raw)
In-Reply-To: <20200410113526.13822-1-colin.king@canonical.com>
On 10/04/20 13:35, Colin King wrote:
> From: Colin Ian King <colin.king@canonical.com>
>
> The variable r is being assigned with a value that is never read
> and it is being updated later with a new value. The initialization is
> redundant and can be removed.
>
> Addresses-Coverity: ("Unused value")
> Signed-off-by: Colin Ian King <colin.king@canonical.com>
> ---
> virt/kvm/kvm_main.c | 1 -
> 1 file changed, 1 deletion(-)
>
> diff --git a/virt/kvm/kvm_main.c b/virt/kvm/kvm_main.c
> index 74bdb7bf3295..03571f6acaa8 100644
> --- a/virt/kvm/kvm_main.c
> +++ b/virt/kvm/kvm_main.c
> @@ -3160,7 +3160,6 @@ static long kvm_vcpu_ioctl(struct file *filp,
> case KVM_SET_REGS: {
> struct kvm_regs *kvm_regs;
>
> - r = -ENOMEM;
> kvm_regs = memdup_user(argp, sizeof(*kvm_regs));
> if (IS_ERR(kvm_regs)) {
> r = PTR_ERR(kvm_regs);
>
Queued, thanks.
Paolo
prev parent reply other threads:[~2020-04-15 14:57 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2020-04-10 11:35 Colin King
2020-04-15 14:56 ` Paolo Bonzini [this message]
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=6d66cb24-b517-1bc3-15c3-9b302215febf@redhat.com \
--to=pbonzini@redhat.com \
--cc=colin.king@canonical.com \
--cc=kernel-janitors@vger.kernel.org \
--cc=kvm@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox
all inboxes | Powered by JetHome®