alsa-devel.alsa-project.org archive mirror
 help / color / mirror / Atom feed
From: Brian Norris <briannorris@chromium.org>
To: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com>
Cc: Liam Girdwood <lgirdwood@gmail.com>,
	Mark Brown <broonie@kernel.org>,
	linux-kernel@vger.kernel.org, Jaroslav Kysela <perex@perex.cz>,
	Takashi Iwai <tiwai@suse.com>,
	alsa-devel@alsa-project.org
Subject: Re: [PATCH for-4.11] ASoC: don't dereference NULL pcm_{new,free}
Date: Fri, 10 Mar 2017 16:39:39 -0800	[thread overview]
Message-ID: <20170311003939.GB4586@google.com> (raw)
In-Reply-To: <87varjz31k.wl%kuninori.morimoto.gx@renesas.com>

Hi Kuninori,

On Thu, Mar 09, 2017 at 12:53:50AM +0000, Kuninori Morimoto wrote:
> > All I know is that I'm definitely hitting a NULL
> > platform->driver->pcm_new callback, and that either reverting your patch
> > or applying the patch I just sent fixes it.
> 
> I want to know why this happen.
> Can you show me which driver is calling snd_soc_add_platform() in your case ?

There are 4 drivers calling that:

  snd_soc_dummy_probe
  rt5514_spi_probe
  2 instances of snd_dmaengine_pcm_register, via rockchip_i2s_probe

Only the latter two seem to run the assignment here:

	if (platform_drv->pcm_new)
		platform->component.pcm_new = snd_soc_platform_drv_pcm_new;

Both snd_soc_dummy_probe and rt5514_spi_probe find ->pcm_new NULL here.

I'm running with the sound/soc/rockchip/rk3399_gru_sound.c platform
driver. If it helps, I'm using the DT posted at [1]. IIUC, the "RT5514
DSP" link is trying to link up a "snd-soc-dummy" instance.

I'm fairly thoroughly confused. Any better ideas?

Brian

[1] https://www.spinics.net/lists/arm-kernel/msg561964.html
    [PATCH v2 4/6] arm64: dts: rockchip: add Gru/Kevin DTS

  reply	other threads:[~2017-03-11  0:39 UTC|newest]

Thread overview: 13+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2017-03-08 23:18 [PATCH for-4.11] ASoC: don't dereference NULL pcm_{new,free} Brian Norris
2017-03-09  0:17 ` [PATCH for-4.11] ASoC: don't dereference NULL pcm_{new, free} Kuninori Morimoto
2017-03-09  0:21   ` [PATCH for-4.11] ASoC: don't dereference NULL pcm_{new,free} Brian Norris
2017-03-09  0:53     ` [PATCH for-4.11] ASoC: don't dereference NULL pcm_{new, free} Kuninori Morimoto
2017-03-11  0:39       ` Brian Norris [this message]
2017-03-13  3:46         ` Kuninori Morimoto
2017-03-13 21:41           ` [PATCH for-4.11] ASoC: don't dereference NULL pcm_{new,free} Brian Norris
2017-03-14  1:07             ` Kuninori Morimoto
2017-03-09 11:09 ` [PATCH for-4.11] ASoC: don't dereference NULL pcm_{new, free} Mark Brown
2017-03-11  0:24   ` [PATCH for-4.11] ASoC: don't dereference NULL pcm_{new,free} Brian Norris
2017-03-13 12:50     ` [PATCH for-4.11] ASoC: don't dereference NULL pcm_{new, free} Mark Brown
2017-03-13 21:52       ` [PATCH for-4.11] ASoC: don't dereference NULL pcm_{new,free} Brian Norris
2017-03-14 13:36         ` [PATCH for-4.11] ASoC: don't dereference NULL pcm_{new, free} Mark Brown

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=20170311003939.GB4586@google.com \
    --to=briannorris@chromium.org \
    --cc=alsa-devel@alsa-project.org \
    --cc=broonie@kernel.org \
    --cc=kuninori.morimoto.gx@renesas.com \
    --cc=lgirdwood@gmail.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=perex@perex.cz \
    --cc=tiwai@suse.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 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).