public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
From: Dave Jiang <dave.jiang@intel.com>
To: Jiapeng Chong <jiapeng.chong@linux.alibaba.com>
Cc: vkoul@kernel.org, dmaengine@vger.kernel.org,
	linux-kernel@vger.kernel.org
Subject: Re: [PATCH] dmaengine: idxd: Fix missing error code in idxd_cdev_open()
Date: Wed, 2 Jun 2021 08:00:57 -0700	[thread overview]
Message-ID: <f4e25e75-35cc-23dc-667a-0d7feb9dc35b@intel.com> (raw)
In-Reply-To: <1622628446-87909-1-git-send-email-jiapeng.chong@linux.alibaba.com>


On 6/2/2021 3:07 AM, Jiapeng Chong wrote:
> The error code is missing in this code scenario, add the error code
> '-EINVAL' to the return value 'rc'.
>
> Eliminate the follow smatch warning:
>
> drivers/dma/idxd/cdev.c:113 idxd_cdev_open() warn: missing error code
> 'rc'.
>
> Reported-by: Abaci Robot <abaci@linux.alibaba.com>
> Signed-off-by: Jiapeng Chong <jiapeng.chong@linux.alibaba.com>

Acked-by: Dave Jiang <dave.jiang@intel.com>


> ---
>   drivers/dma/idxd/cdev.c | 1 +
>   1 file changed, 1 insertion(+)
>
> diff --git a/drivers/dma/idxd/cdev.c b/drivers/dma/idxd/cdev.c
> index 302cba5..d4419bf 100644
> --- a/drivers/dma/idxd/cdev.c
> +++ b/drivers/dma/idxd/cdev.c
> @@ -110,6 +110,7 @@ static int idxd_cdev_open(struct inode *inode, struct file *filp)
>   		pasid = iommu_sva_get_pasid(sva);
>   		if (pasid == IOMMU_PASID_INVALID) {
>   			iommu_sva_unbind_device(sva);
> +			rc = -EINVAL;
>   			goto failed;
>   		}
>   

  reply	other threads:[~2021-06-02 15:01 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-06-02 10:07 [PATCH] dmaengine: idxd: Fix missing error code in idxd_cdev_open() Jiapeng Chong
2021-06-02 15:00 ` Dave Jiang [this message]
2021-06-03  6:59 ` Vinod Koul

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=f4e25e75-35cc-23dc-667a-0d7feb9dc35b@intel.com \
    --to=dave.jiang@intel.com \
    --cc=dmaengine@vger.kernel.org \
    --cc=jiapeng.chong@linux.alibaba.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=vkoul@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