All of lore.kernel.org
 help / color / mirror / Atom feed
From: Dan Carpenter <dan.carpenter@oracle.com>
To: kernel-janitors@vger.kernel.org
Subject: re: net: Microchip encx24j600 driver
Date: Tue, 06 Oct 2015 19:00:37 +0000	[thread overview]
Message-ID: <20151006190037.GA31786@mwanda> (raw)

Hello Jon Ringle,

This is a semi-automatic email about new static checker warnings.

The patch 04fbfce7a222: "net: Microchip encx24j600 driver" from Oct 
1, 2015, leads to the following Smatch complaint:

drivers/net/ethernet/microchip/encx24j600.c:313 encx24j600_tx_complete()
	 warn: variable dereferenced before check 'priv->tx_skb' (see line 307)

drivers/net/ethernet/microchip/encx24j600.c
   306	
   307		dev->stats.tx_bytes += priv->tx_skb->len;
                                       ^^^^^^^^^^^^
Unchecked dereference.

   308	
   309		encx24j600_clr_bits(priv, EIR, TXIF | TXABTIF);
   310	
   311		netif_dbg(priv, tx_done, dev, "TX Done%s\n", err ? ": Err" : "");
   312	
   313		if (priv->tx_skb) {
                    ^^^^^^^^^^^^
Too late.

   314			dev_kfree_skb(priv->tx_skb);
   315			priv->tx_skb = NULL;

regards,
dan carpenter

                 reply	other threads:[~2015-10-06 19:00 UTC|newest]

Thread overview: [no followups] expand[flat|nested]  mbox.gz  Atom feed

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=20151006190037.GA31786@mwanda \
    --to=dan.carpenter@oracle.com \
    --cc=kernel-janitors@vger.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 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.