kernel-janitors.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* re: mailbox: Add Broadcom PDC mailbox driver
@ 2016-08-03 10:58 Dan Carpenter
  0 siblings, 0 replies; only message in thread
From: Dan Carpenter @ 2016-08-03 10:58 UTC (permalink / raw)
  To: kernel-janitors

Hello Rob Rice,

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

The patch a24532f8d17b: "mailbox: Add Broadcom PDC mailbox driver" 
from Jun 30, 2016, leads to the following Smatch complaint:

drivers/mailbox/bcm-pdc-mailbox.c:929 pdc_irq_handler()
	 warn: variable dereferenced before check 'pdcs' (see line 918)

drivers/mailbox/bcm-pdc-mailbox.c
   917		struct pdc_state *pdcs = cookie;
   918		u32 intstatus = ioread32(pdcs->pdc_reg_vbase + PDC_INTSTATUS_OFFSET);
                                         ^^^^^^^^^^^^^^^^^^^
Dereference.

   919	
   920		if (intstatus & PDC_XMTINTEN_0)
   921			set_bit(PDC_XMTINT_0, &pdcs->intstatus);
   922		if (intstatus & PDC_RCVINTEN_0)
   923			set_bit(PDC_RCVINT_0, &pdcs->intstatus);
   924	
   925		/* Clear interrupt flags in device */
   926		iowrite32(intstatus, pdcs->pdc_reg_vbase + PDC_INTSTATUS_OFFSET);
   927	
   928		/* Wakeup IRQ thread */
   929		if (pdcs && (irq = pdcs->pdc_irq) && (intstatus & PDC_INTMASK))
                    ^^^^
Check too late to do any good.  Delete?

   930			return IRQ_WAKE_THREAD;
   931	

regards,
dan carpenter

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

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

Thread overview: (only message) (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2016-08-03 10:58 mailbox: Add Broadcom PDC mailbox driver 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).