All of lore.kernel.org
 help / color / mirror / Atom feed
From: Liam Girdwood <lrg@ti.com>
To: Jarkko Nikula <jhnikula@gmail.com>
Cc: "alsa-devel@alsa-project.org" <alsa-devel@alsa-project.org>,
	Mark Brown <broonie@opensource.wolfsonmicro.com>
Subject: Re: [PATCHv2] ASoC: core: Don't set "(null)" as a driver name
Date: Fri, 20 May 2011 13:47:32 +0100	[thread overview]
Message-ID: <4DD662E4.4020803@ti.com> (raw)
In-Reply-To: <1305895660-15383-1-git-send-email-jhnikula@gmail.com>

On 20/05/11 13:47, Jarkko Nikula wrote:
> Commit 22de71b ("ASoC: core - allow ASoC more flexible machine name")
> writes "(null)" to driver name string in struct snd_card if card->driver_name
> is NULL. This causes segmentation faults with some user space ALSA utilities
> like aplay and arecord.
> 
> Fix this by using the card->name if no driver name is specified.
> 
> Signed-off-by: Jarkko Nikula <jhnikula@gmail.com>
> ---
>  sound/soc/soc-core.c |    2 +-
>  1 files changed, 1 insertions(+), 1 deletions(-)
> 
> diff --git a/sound/soc/soc-core.c b/sound/soc/soc-core.c
> index 5968745..bb7cd58 100644
> --- a/sound/soc/soc-core.c
> +++ b/sound/soc/soc-core.c
> @@ -1930,7 +1930,7 @@ static void snd_soc_instantiate_card(struct snd_soc_card *card)
>  	snprintf(card->snd_card->longname, sizeof(card->snd_card->longname),
>  		 "%s", card->long_name ? card->long_name : card->name);
>  	snprintf(card->snd_card->driver, sizeof(card->snd_card->driver),
> -		 "%s", card->driver_name);
> +		 "%s", card->driver_name ? card->driver_name : card->name);
>  
>  	if (card->late_probe) {
>  		ret = card->late_probe(card);

Acked-by: Liam Girdwood <lrg@ti.com>

  reply	other threads:[~2011-05-20 12:47 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2011-05-20 12:47 [PATCHv2] ASoC: core: Don't set "(null)" as a driver name Jarkko Nikula
2011-05-20 12:47 ` Liam Girdwood [this message]
2011-05-21 10:58 ` 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=4DD662E4.4020803@ti.com \
    --to=lrg@ti.com \
    --cc=alsa-devel@alsa-project.org \
    --cc=broonie@opensource.wolfsonmicro.com \
    --cc=jhnikula@gmail.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.