From: Dan Carpenter <dan.carpenter@oracle.com>
To: kernel-janitors@vger.kernel.org
Subject: re: drivers/net: support hdlc function for QE-UCC
Date: Wed, 03 Aug 2016 13:06:25 +0000 [thread overview]
Message-ID: <20160803130625.GA27767@mwanda> (raw)
Hello Zhao Qiang,
This is a semi-automatic email about new static checker warnings.
The patch c19b6d246a35: "drivers/net: support hdlc function for
QE-UCC" from Jun 6, 2016, leads to the following Smatch complaint:
drivers/net/wan/fsl_ucc_hdlc.c:707 uhdlc_memclean()
warn: variable dereferenced before check 'priv->ucc_pram' (see line 686)
drivers/net/wan/fsl_ucc_hdlc.c
685 {
686 qe_muram_free(priv->ucc_pram->riptr);
687 qe_muram_free(priv->ucc_pram->tiptr);
^^^^^^^^^^^^^^
Dereference.
688
689 if (priv->rx_bd_base) {
690 dma_free_coherent(priv->dev,
691 RX_BD_RING_LEN * sizeof(struct qe_bd),
692 priv->rx_bd_base, priv->dma_rx_bd);
693
694 priv->rx_bd_base = NULL;
695 priv->dma_rx_bd = 0;
696 }
697
698 if (priv->tx_bd_base) {
699 dma_free_coherent(priv->dev,
700 TX_BD_RING_LEN * sizeof(struct qe_bd),
701 priv->tx_bd_base, priv->dma_tx_bd);
702
703 priv->tx_bd_base = NULL;
704 priv->dma_tx_bd = 0;
705 }
706
707 if (priv->ucc_pram) {
^^^^^^^^^^^^^^
Checked too late.
708 qe_muram_free(priv->ucc_pram_offset);
709 priv->ucc_pram = NULL;
regards,
dan carpenter
reply other threads:[~2016-08-03 13:06 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=20160803130625.GA27767@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.