From: Dan Carpenter <dan.carpenter@oracle.com>
To: kbuild@lists.01.org
Subject: Re: [wireless-drivers-next:master 8/21] drivers/net/wireless/quantenna/qtnfmac/pcie/pearl_pcie.c:596 qtnf_pcie_skb_send() warn: variable dereferenced before check 'skb' (see line 560)
Date: Thu, 21 Nov 2019 21:54:36 +0300 [thread overview]
Message-ID: <20191121185436.GC617@kadam> (raw)
In-Reply-To: <a8c4bec3-4108-d460-3766-eb5548d5f878@quantenna.com>
[-- Attachment #1: Type: text/plain, Size: 423 bytes --]
On Thu, Nov 21, 2019 at 04:06:10PM +0000, Igor Mitsyanko wrote:
> Thanks Dan!
>
> @Sergey I think we do not need !skb check at all in this function,
> agree? I assume if we remove "if (ret && skb)" it will make smatch happy?
>
Yes. Smatch only cares about consistent checking. Or it will accept
inconsistent NULL checks so long as it is convinced that the pointer
can't be NULL.
regards,
dan carpenter
WARNING: multiple messages have this Message-ID (diff)
From: Dan Carpenter <dan.carpenter@oracle.com>
To: kbuild-all@lists.01.org
Subject: Re: [wireless-drivers-next:master 8/21] drivers/net/wireless/quantenna/qtnfmac/pcie/pearl_pcie.c:596 qtnf_pcie_skb_send() warn: variable dereferenced before check 'skb' (see line 560)
Date: Thu, 21 Nov 2019 21:54:36 +0300 [thread overview]
Message-ID: <20191121185436.GC617@kadam> (raw)
In-Reply-To: <a8c4bec3-4108-d460-3766-eb5548d5f878@quantenna.com>
[-- Attachment #1: Type: text/plain, Size: 423 bytes --]
On Thu, Nov 21, 2019 at 04:06:10PM +0000, Igor Mitsyanko wrote:
> Thanks Dan!
>
> @Sergey I think we do not need !skb check at all in this function,
> agree? I assume if we remove "if (ret && skb)" it will make smatch happy?
>
Yes. Smatch only cares about consistent checking. Or it will accept
inconsistent NULL checks so long as it is convinced that the pointer
can't be NULL.
regards,
dan carpenter
next parent reply other threads:[~2019-11-21 18:54 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
[not found] <a8c4bec3-4108-d460-3766-eb5548d5f878@quantenna.com>
2019-11-21 18:54 ` Dan Carpenter [this message]
2019-11-21 18:54 ` [wireless-drivers-next:master 8/21] drivers/net/wireless/quantenna/qtnfmac/pcie/pearl_pcie.c:596 qtnf_pcie_skb_send() warn: variable dereferenced before check 'skb' (see line 560) Dan Carpenter
2019-11-21 8:04 Dan Carpenter
2019-11-21 8:04 ` Dan Carpenter
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=20191121185436.GC617@kadam \
--to=dan.carpenter@oracle.com \
--cc=kbuild@lists.01.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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.