From: dan.carpenter@oracle.com (Dan Carpenter)
To: linux-arm-kernel@lists.infradead.org
Subject: mfd: ab8500-debug: Add wake-up info
Date: Thu, 7 Nov 2013 16:43:26 +0300 [thread overview]
Message-ID: <20131107134326.GO20521@mwanda> (raw)
In-Reply-To: <20130826150908.GB12428@elgon.mountain>
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
next parent reply other threads:[~2013-11-07 13:43 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
[not found] <20130826150908.GB12428@elgon.mountain>
2013-11-07 13:43 ` Dan Carpenter [this message]
2013-11-08 9:20 ` mfd: ab8500-debug: Add wake-up info Lee Jones
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=20131107134326.GO20521@mwanda \
--to=dan.carpenter@oracle.com \
--cc=linux-arm-kernel@lists.infradead.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 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).