linux-wireless.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Dan Carpenter <dan.carpenter@oracle.com>
To: c_manoha@qca.qualcomm.com
Cc: linux-wireless@vger.kernel.org
Subject: Re: ath: Add support for tracing
Date: Fri, 3 Oct 2014 15:13:31 +0300	[thread overview]
Message-ID: <20141003121331.GK5865@mwanda> (raw)
In-Reply-To: <20141003121101.GA23748@mwanda>

On Fri, Oct 03, 2014 at 03:11:01PM +0300, Dan Carpenter wrote:
> Hello Sujith Manoharan,
> 
> This is a semi-automatic email about new static checker warnings.
> 
> The patch e6664dff0608: "ath: Add support for tracing" from Sep 27, 
> 2014, leads to the following Smatch complaint:
> 
> drivers/net/wireless/ath/main.c:88 ath_printk()
> 	 error: we previously assumed 'common->hw' could be null (see line 82)
> 
> drivers/net/wireless/ath/main.c
>     81	
>     82		if (common && common->hw && common->hw->wiphy)

Oh.  And also common is assumed to be possibly NULL as well.

regards,
dan carpenter

>                               ^^^^^^^^^^
> Existing code assumes common->hw can be NULL.
> 
>     83			printk("%sath: %s: %pV",
>     84			       level, wiphy_name(common->hw->wiphy), &vaf);
>     85		else
>     86			printk("%sath: %pV", level, &vaf);
>     87	
>     88		trace_ath_log(common->hw->wiphy, &vaf);
>                               ^^^^^^^^^^^^^^^^^
> New code dereferences it without checking for NULL.
> 
>     89	
>     90		va_end(args);
> 
> regards,
> dan carpenter

  reply	other threads:[~2014-10-03 12:13 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2014-10-03 12:11 ath: Add support for tracing Dan Carpenter
2014-10-03 12:13 ` Dan Carpenter [this message]
2014-10-06  5:34 ` Sujith Manoharan

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=20141003121331.GK5865@mwanda \
    --to=dan.carpenter@oracle.com \
    --cc=c_manoha@qca.qualcomm.com \
    --cc=linux-wireless@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 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).