From: Alex Williamson <alex.williamson@redhat.com>
To: Yang Yingliang <yangyingliang@huawei.com>
Cc: <kvm@vger.kernel.org>, <linux-kernel@vger.kernel.org>,
<brett.creeley@amd.com>, <jgg@ziepe.ca>, <yishaih@nvidia.com>,
<shameerali.kolothum.thodi@huawei.com>, <kevin.tian@intel.com>,
<horms@kernel.org>, <shannon.nelson@amd.com>
Subject: Re: [PATCH -next] vfio/pds: fix return value in pds_vfio_get_lm_file()
Date: Mon, 21 Aug 2023 09:08:49 -0600 [thread overview]
Message-ID: <20230821090849.79fe44a4.alex.williamson@redhat.com> (raw)
In-Reply-To: <20230819023716.3469037-1-yangyingliang@huawei.com>
On Sat, 19 Aug 2023 10:37:16 +0800
Yang Yingliang <yangyingliang@huawei.com> wrote:
> anon_inode_getfile() never returns NULL pointer, it will return
> ERR_PTR() when it fails, so replace the check with IS_ERR().
>
> Fixes: bb500dbe2ac6 ("vfio/pds: Add VFIO live migration support")
> Signed-off-by: Yang Yingliang <yangyingliang@huawei.com>
> ---
> drivers/vfio/pci/pds/lm.c | 2 +-
> 1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/drivers/vfio/pci/pds/lm.c b/drivers/vfio/pci/pds/lm.c
> index aec75574cab3..79fe2e66bb49 100644
> --- a/drivers/vfio/pci/pds/lm.c
> +++ b/drivers/vfio/pci/pds/lm.c
> @@ -31,7 +31,7 @@ pds_vfio_get_lm_file(const struct file_operations *fops, int flags, u64 size)
> /* Create file */
> lm_file->filep =
> anon_inode_getfile("pds_vfio_lm", fops, lm_file, flags);
> - if (!lm_file->filep)
> + if (IS_ERR(lm_file->filep))
> goto out_free_file;
>
> stream_open(lm_file->filep->f_inode, lm_file->filep);
Applied to vfio next branch for v6.6. Thanks,
Alex
prev parent reply other threads:[~2023-08-21 15:09 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2023-08-19 2:37 Yang Yingliang
2023-08-19 18:15 ` Brett Creeley
2023-08-21 15:08 ` Alex Williamson [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=20230821090849.79fe44a4.alex.williamson@redhat.com \
--to=alex.williamson@redhat.com \
--cc=brett.creeley@amd.com \
--cc=horms@kernel.org \
--cc=jgg@ziepe.ca \
--cc=kevin.tian@intel.com \
--cc=kvm@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=shameerali.kolothum.thodi@huawei.com \
--cc=shannon.nelson@amd.com \
--cc=yangyingliang@huawei.com \
--cc=yishaih@nvidia.com \
/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®