From: t.figa@samsung.com (Tomasz Figa)
To: linux-arm-kernel@lists.infradead.org
Subject: [PATCH] ASoC: Samsung: i2s: Fix crash in i2s driver
Date: Tue, 07 May 2013 11:50:51 +0200 [thread overview]
Message-ID: <2286960.PxJxnETVLS@amdc1227> (raw)
In-Reply-To: <1367897941-18439-1-git-send-email-padma.v@samsung.com>
Hi Padmavathi,
On Tuesday 07 of May 2013 09:09:01 Padmavathi Venna wrote:
> This patch fixes a null pointer deference in i2s driver in DT
> case
>
> Signed-off-by: Padmavathi Venna <padma.v@samsung.com>
> ---
>
> This patch is dependent on below patch posted by Thomas Abraham.
> https://patchwork.kernel.org/patch/2224801/
>
> sound/soc/samsung/i2s.c | 2 +-
> 1 files changed, 1 insertions(+), 1 deletions(-)
>
> diff --git a/sound/soc/samsung/i2s.c b/sound/soc/samsung/i2s.c
> index 7ce7c50..eaf6439 100644
> --- a/sound/soc/samsung/i2s.c
> +++ b/sound/soc/samsung/i2s.c
> @@ -1182,7 +1182,7 @@ static int samsung_i2s_probe(struct platform_device
> *pdev) pri_dai->sec_dai = sec_dai;
> }
>
> - if (i2s_pdata->cfg_gpio && i2s_pdata->cfg_gpio(pdev)) {
> + if (i2s_pdata && i2s_pdata->cfg_gpio && i2s_pdata->cfg_gpio(pdev)) {
This is a problem that needs to be fixed indeed. However the same problem
exists in samsung_i2s_remove() as well (at least in latest linux-next).
This makes me wonder what happens with i2s_pdata in DT case. Most of drivers
allocate a pdata struct anyway and fill it with data parsed from device tree.
This allows rest of the code to remain unmodified and consider DT and non-DT
cases equal.
Best regards,
--
Tomasz Figa
Samsung Poland R&D Center
SW Solution Development, Kernel and System Framework
next prev parent reply other threads:[~2013-05-07 9:50 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2013-05-07 3:39 [PATCH] ASoC: Samsung: i2s: Fix crash in i2s driver Padmavathi Venna
2013-05-07 9:03 ` Mark Brown
2013-05-07 9:50 ` Tomasz Figa [this message]
2013-05-07 11:12 ` Padma Venkat
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=2286960.PxJxnETVLS@amdc1227 \
--to=t.figa@samsung.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