All of lore.kernel.org
 help / color / mirror / Atom feed
From: Dan Carpenter <dan.carpenter@oracle.com>
To: vinod.koul@intel.com
Cc: alsa-devel@alsa-project.org
Subject: Re: ASoC: Intel: mrfld: add DSP core controls
Date: Wed, 29 Oct 2014 18:14:57 +0300	[thread overview]
Message-ID: <20141029151457.GA29163@mwanda> (raw)

Hello Vinod Koul,

The patch 24c8d14192cc: "ASoC: Intel: mrfld: add DSP core controls"
from Oct 15, 2014, leads to the following static checker warning:

	sound/soc/intel/sst-atom-controls.c:1354 sst_map_modules_to_pipe()
	warn: variable dereferenced before check 'platform' (see line 1353)

sound/soc/intel/sst-atom-controls.c
  1348  static int sst_map_modules_to_pipe(struct snd_soc_platform *platform)
  1349  {
  1350          struct snd_soc_dapm_widget *w;
  1351          int ret = 0;
  1352  
  1353          list_for_each_entry(w, &platform->component.card->widgets, list) {
                                        ^^^^^^^^
New dereference.

  1354                  if (platform && is_sst_dapm_widget(w) && (w->priv)) {
                            ^^^^^^^^
New check.

  1355                          struct sst_ids *ids = w->priv;
  1356  
  1357                          dev_dbg(platform->dev, "widget type=%d name=%s\n",
  1358                                          w->id, w->name);
  1359                          INIT_LIST_HEAD(&ids->algo_list);
  1360                          INIT_LIST_HEAD(&ids->gain_list);
  1361                          ret = sst_fill_widget_module_info(w, platform);
  1362  
  1363                          if (ret < 0)
  1364                                  return ret;
  1365  
  1366                          /* fill linked widgets */
  1367                          if (ids->parent_wname !=  NULL)
  1368                                  sst_fill_linked_widgets(platform, ids);
  1369                  }
  1370          }
  1371          return 0;
  1372  }

regards,
dan carpenter

             reply	other threads:[~2014-10-29 15:15 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2014-10-29 15:14 Dan Carpenter [this message]
2014-11-03  5:45 ` ASoC: Intel: mrfld: add DSP core controls Vinod Koul

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=20141029151457.GA29163@mwanda \
    --to=dan.carpenter@oracle.com \
    --cc=alsa-devel@alsa-project.org \
    --cc=vinod.koul@intel.com \
    /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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.