Devicetree
 help / color / mirror / Atom feed
From: Dan Carpenter <dan.carpenter-QHcLZuEGTsvQT0dZR+AlfA@public.gmane.org>
To: philippe.retornaz-p8DiymsW2f8@public.gmane.org
Cc: devicetree-discuss-uLR06cmDAlY/bJ5BZ2RsiQ@public.gmane.org
Subject: re: mfd: mc13xxx: add codec platform data
Date: Mon, 21 May 2012 17:34:59 +0300	[thread overview]
Message-ID: <20120521143459.GA25114@elgon.mountain> (raw)

Hello Philippe Rétornaz,

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

The patch e3a0871c8f67: "mfd: mc13xxx: add codec platform data" from 
May 15, 2012, leads to the following Smatch complaint:

drivers/mfd/mc13xxx-core.c:695 mc13xxx_common_init()
	 error: we previously assumed 'pdata' could be null (see line 687)

drivers/mfd/mc13xxx-core.c
   686	
   687		if (mc13xxx_probe_flags_dt(mc13xxx) < 0 && pdata)
                                                          ^^^^^^
Old check.

   688			mc13xxx->flags = pdata->flags;
   689	
   690		if (mc13xxx->flags & MC13XXX_USE_ADC)
   691			mc13xxx_add_subdevice(mc13xxx, "%s-adc");
   692	
   693		if (mc13xxx->flags & MC13XXX_USE_CODEC)
   694			mc13xxx_add_subdevice_pdata(mc13xxx, "%s-codec",
   695						pdata->codec, sizeof(*pdata->codec));
                                                ^^^^^^^^^^^^
New dereference.

   696	
   697		if (mc13xxx->flags & MC13XXX_USE_RTC)

regards,
dan carpenter

                 reply	other threads:[~2012-05-21 14:34 UTC|newest]

Thread overview: [no followups] expand[flat|nested]  mbox.gz  Atom feed

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=20120521143459.GA25114@elgon.mountain \
    --to=dan.carpenter-qhclzuegtsvqt0dzr+alfa@public.gmane.org \
    --cc=devicetree-discuss-uLR06cmDAlY/bJ5BZ2RsiQ@public.gmane.org \
    --cc=philippe.retornaz-p8DiymsW2f8@public.gmane.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