linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Samuel Cabrero <scabrero@suse.de>
To: YueHaibing <yuehaibing@huawei.com>,
	sfrench@samba.org, dan.carpenter@oracle.com, aaptel@suse.com
Cc: linux-cifs@vger.kernel.org, samba-technical@lists.samba.org,
	linux-kernel@vger.kernel.org
Subject: Re: [PATCH] cifs: Fix inconsistent IS_ERR and PTR_ERR
Date: Fri, 19 Feb 2021 17:48:01 +0100	[thread overview]
Message-ID: <ee53a10aa0bf87445b1ab6be7c2db60aecd568cf.camel@suse.de> (raw)
In-Reply-To: <20210218092812.20004-1-yuehaibing@huawei.com>

Thanks Yue, it looks good to me.

Reviewed-by: Samuel Cabrero <scabrero@suse.de>

On Thu, 2021-02-18 at 17:28 +0800, YueHaibing wrote:
> Fix inconsistent IS_ERR and PTR_ERR in cifs_find_swn_reg(). The
> proper
> pointer to be passed as argument to PTR_ERR() is share_name.
> 
> This bug was detected with the help of Coccinelle.
> 
> Fixes: bf80e5d4259a ("cifs: Send witness register and unregister
> commands to userspace daemon")
> Signed-off-by: YueHaibing <yuehaibing@huawei.com>
> ---
>  fs/cifs/cifs_swn.c | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
> 
> diff --git a/fs/cifs/cifs_swn.c b/fs/cifs/cifs_swn.c
> index d35f599aa00e..f2d730fffccb 100644
> --- a/fs/cifs/cifs_swn.c
> +++ b/fs/cifs/cifs_swn.c
> @@ -272,7 +272,7 @@ static struct cifs_swn_reg
> *cifs_find_swn_reg(struct cifs_tcon *tcon)
>         if (IS_ERR(share_name)) {
>                 int ret;
>  
> -               ret = PTR_ERR(net_name);
> +               ret = PTR_ERR(share_name);
>                 cifs_dbg(VFS, "%s: failed to extract share name from
> target '%s': %d\n",
>                                 __func__, tcon->treeName, ret);
>                 kfree(net_name);



      reply	other threads:[~2021-02-19 16:48 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-02-18  9:28 [PATCH] cifs: Fix inconsistent IS_ERR and PTR_ERR YueHaibing
2021-02-19 16:48 ` Samuel Cabrero [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=ee53a10aa0bf87445b1ab6be7c2db60aecd568cf.camel@suse.de \
    --to=scabrero@suse.de \
    --cc=aaptel@suse.com \
    --cc=dan.carpenter@oracle.com \
    --cc=linux-cifs@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=samba-technical@lists.samba.org \
    --cc=scabrero@suse.com \
    --cc=sfrench@samba.org \
    --cc=yuehaibing@huawei.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;
as well as URLs for NNTP newsgroup(s).