From: Andrew Rybchenko <arybchenko@solarflare.com>
To: <dev@dpdk.org>
Subject: [dpdk-dev] [PATCH] net/sfc: do not dereference pointer before check vs NULL
Date: Tue, 4 Apr 2017 13:49:21 +0100 [thread overview]
Message-ID: <1491310161-24247-1-git-send-email-arybchenko@solarflare.com> (raw)
Coverity issue: 1423925
Fixes: e18dbbd3083a ("net/sfc: remove EvQ info array to simplify reconfigure")
Signed-off-by: Andrew Rybchenko <arybchenko@solarflare.com>
Reviewed-by: Andy Moreton <amoreton@solarflare.com>
---
It may be squashed into e18dbbd3083a.
drivers/net/sfc/sfc_ev.c | 7 ++++---
1 file changed, 4 insertions(+), 3 deletions(-)
diff --git a/drivers/net/sfc/sfc_ev.c b/drivers/net/sfc/sfc_ev.c
index 26e6b2f..160d39f 100644
--- a/drivers/net/sfc/sfc_ev.c
+++ b/drivers/net/sfc/sfc_ev.c
@@ -673,11 +673,12 @@ sfc_ev_qstart(struct sfc_evq *evq, unsigned int hw_index)
void
sfc_ev_qstop(struct sfc_evq *evq)
{
- struct sfc_adapter *sa = evq->sa;
+ if (evq == NULL)
+ return;
- sfc_log_init(sa, "hw_index=%u", evq->evq_index);
+ sfc_log_init(evq->sa, "hw_index=%u", evq->evq_index);
- if (evq == NULL || evq->init_state != SFC_EVQ_STARTED)
+ if (evq->init_state != SFC_EVQ_STARTED)
return;
evq->init_state = SFC_EVQ_INITIALIZED;
--
2.7.4
next reply other threads:[~2017-04-04 12:49 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2017-04-04 12:49 Andrew Rybchenko [this message]
2017-04-04 13:17 ` Ferruh Yigit
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=1491310161-24247-1-git-send-email-arybchenko@solarflare.com \
--to=arybchenko@solarflare.com \
--cc=dev@dpdk.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;
as well as URLs for NNTP newsgroup(s).