linux-arm-kernel.lists.infradead.org archive mirror
 help / color / mirror / Atom feed
* mfd: ab8500-debug: Add wake-up info
       [not found] <20130826150908.GB12428@elgon.mountain>
@ 2013-11-07 13:43 ` Dan Carpenter
  2013-11-08  9:20   ` Lee Jones
  0 siblings, 1 reply; 2+ messages in thread
From: Dan Carpenter @ 2013-11-07 13:43 UTC (permalink / raw)
  To: linux-arm-kernel

What ever happened to this?  Can "desc" be NULL or not?

regards,
dan carpenter

On Mon, Aug 26, 2013 at 06:09:08PM +0300, Dan Carpenter wrote:
> Hello Jonas Aaberg,
> 
> This is a semi-automatic email about new static checker warnings.
> 
> The patch 2cf64e264828: "mfd: ab8500-debug: Add wake-up info" from 
> May 31, 2012, leads to the following Smatch complaint:
> 
> drivers/mfd/ab8500-debugfs.c:1609 ab8500_interrupts_print()
> 	 warn: variable dereferenced before check 'desc' (see line 1603)
> 
> drivers/mfd/ab8500-debugfs.c
>   1602			struct irq_desc *desc = irq_to_desc(line + irq_first);
>   1603			struct irqaction *action = desc->action;
>                                                    ^^^^^^^^^^^^
> Patch adds dereference.
> 
>   1604	
>   1605			seq_printf(s, "%3i:  %6i %4i", line,
>   1606				   num_interrupts[line],
>   1607				   num_wake_interrupts[line]);
>   1608	
>   1609			if (desc && desc->name)
>                             ^^^^
> Patch adds check.
> 
>   1610				seq_printf(s, "-%-8s", desc->name);
>   1611			if (action) {
> 
> regards,
> dan carpenter

^ permalink raw reply	[flat|nested] 2+ messages in thread

* mfd: ab8500-debug: Add wake-up info
  2013-11-07 13:43 ` mfd: ab8500-debug: Add wake-up info Dan Carpenter
@ 2013-11-08  9:20   ` Lee Jones
  0 siblings, 0 replies; 2+ messages in thread
From: Lee Jones @ 2013-11-08  9:20 UTC (permalink / raw)
  To: linux-arm-kernel

> What ever happened to this?  Can "desc" be NULL or not?

You'll be lucky to get a response. ST-Ericsson are quite dead.

However, from my investigation it appears desc 'can' be NULL.

> On Mon, Aug 26, 2013 at 06:09:08PM +0300, Dan Carpenter wrote:
> > Hello Jonas Aaberg,
> > 
> > This is a semi-automatic email about new static checker warnings.
> > 
> > The patch 2cf64e264828: "mfd: ab8500-debug: Add wake-up info" from 
> > May 31, 2012, leads to the following Smatch complaint:
> > 
> > drivers/mfd/ab8500-debugfs.c:1609 ab8500_interrupts_print()
> > 	 warn: variable dereferenced before check 'desc' (see line 1603)
> > 
> > drivers/mfd/ab8500-debugfs.c
> >   1602			struct irq_desc *desc = irq_to_desc(line + irq_first);
> >   1603			struct irqaction *action = desc->action;
> >                                                    ^^^^^^^^^^^^
> > Patch adds dereference.
> > 
> >   1604	
> >   1605			seq_printf(s, "%3i:  %6i %4i", line,
> >   1606				   num_interrupts[line],
> >   1607				   num_wake_interrupts[line]);
> >   1608	
> >   1609			if (desc && desc->name)
> >                             ^^^^
> > Patch adds check.
> > 
> >   1610				seq_printf(s, "-%-8s", desc->name);
> >   1611			if (action) {
> > 
> > regards,
> > dan carpenter
> 
> _______________________________________________
> linux-arm-kernel mailing list
> linux-arm-kernel at lists.infradead.org
> http://lists.infradead.org/mailman/listinfo/linux-arm-kernel

-- 
Lee Jones
Linaro STMicroelectronics Landing Team Lead
Linaro.org ? Open source software for ARM SoCs
Follow Linaro: Facebook | Twitter | Blog

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2013-11-08  9:20 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
     [not found] <20130826150908.GB12428@elgon.mountain>
2013-11-07 13:43 ` mfd: ab8500-debug: Add wake-up info Dan Carpenter
2013-11-08  9:20   ` Lee Jones

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