linux-arm-kernel.lists.infradead.org archive mirror
 help / color / mirror / Atom feed
From: richard.genoud@gmail.com (Richard Genoud)
To: linux-arm-kernel@lists.infradead.org
Subject: [PATCH 1/2] ASoC: atmel: sam9x5_wm8731: fix oops when unload module
Date: Tue, 26 Nov 2013 12:32:23 +0100	[thread overview]
Message-ID: <CACQ1gAh3W3vyTpFv8CkbO8hFJtU_SDjVuh2pRSFWCbUZPmidsw@mail.gmail.com> (raw)
In-Reply-To: <1385439472-23352-1-git-send-email-voice.shen@atmel.com>

2013/11/26 Bo Shen <voice.shen@atmel.com>:
> As the priv is not assigned to card->drvdata, it is NULL, so when
> unload module, it will cause NULL pointer oops.
> Assign priv to card->drvdata to fix this issue.
>
> Signed-off-by: Bo Shen <voice.shen@atmel.com>
> ---
>  sound/soc/atmel/sam9x5_wm8731.c |    1 +
>  1 file changed, 1 insertion(+)
>
> diff --git a/sound/soc/atmel/sam9x5_wm8731.c b/sound/soc/atmel/sam9x5_wm8731.c
> index 992ae38..6dc33ac 100644
> --- a/sound/soc/atmel/sam9x5_wm8731.c
> +++ b/sound/soc/atmel/sam9x5_wm8731.c
> @@ -99,6 +99,7 @@ static int sam9x5_wm8731_driver_probe(struct platform_device *pdev)
>
>         card->dev = &pdev->dev;
>         card->owner = THIS_MODULE;
> +       card->drvdata = priv;
>         card->dai_link = dai;
>         card->num_links = 1;
>         card->dapm_widgets = sam9x5_dapm_widgets;
> --
> 1.7.9.5
>
There's no oops any more !

Tested-by: Richard Genoud <richard.genoud@gmail.com>

This should also go in -stable don't you think ?

Maybe it's a bug on my kernel, but did you try to reload the module
and play something ?
On my board once I unload/reload it, there's no sound comming out
(at least, it's better than a oops ! :) )

Richard.

  parent reply	other threads:[~2013-11-26 11:32 UTC|newest]

Thread overview: 10+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2013-11-26  4:17 [PATCH 1/2] ASoC: atmel: sam9x5_wm8731: fix oops when unload module Bo Shen
2013-11-26  4:17 ` [PATCH 2/2] ASoC: atmel: sam9x5_wm8731: remove platform_set_drvdata Bo Shen
2013-11-26 11:42   ` Richard Genoud
2013-11-26 11:32 ` Richard Genoud [this message]
2013-11-27  1:13   ` [PATCH 1/2] ASoC: atmel: sam9x5_wm8731: fix oops when unload module Bo Shen
2013-11-27 10:09     ` Richard Genoud
2013-11-28  1:20       ` Bo Shen
2013-11-29 14:59         ` Richard Genoud
2013-11-26 13:22 ` Mark Brown
2013-11-27  1:16   ` Bo Shen

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=CACQ1gAh3W3vyTpFv8CkbO8hFJtU_SDjVuh2pRSFWCbUZPmidsw@mail.gmail.com \
    --to=richard.genoud@gmail.com \
    --cc=linux-arm-kernel@lists.infradead.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).