kernel-janitors.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* re: drivers/net: support hdlc function for QE-UCC
@ 2016-08-03 13:06 Dan Carpenter
  0 siblings, 0 replies; only message in thread
From: Dan Carpenter @ 2016-08-03 13:06 UTC (permalink / raw)
  To: kernel-janitors

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

^ permalink raw reply	[flat|nested] only message in thread

only message in thread, other threads:[~2016-08-03 13:06 UTC | newest]

Thread overview: (only message) (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2016-08-03 13:06 drivers/net: support hdlc function for QE-UCC Dan Carpenter

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).