All of lore.kernel.org
 help / color / mirror / Atom feed
From: Liam Girdwood <lrg@slimlogic.co.uk>
To: Dan Carpenter <error27@gmail.com>
Cc: alsa-devel@alsa-project.org, broonie@opensource.wolfsonmicro.com
Subject: Re: [patch] move dereference after null check
Date: Mon, 16 Nov 2009 10:36:49 +0000	[thread overview]
Message-ID: <1258367809.3570.9.camel@odin> (raw)
In-Reply-To: <alpine.DEB.2.00.0911151555010.12810@bicker>

On Mon, 2009-11-16 at 11:06 +0200, Dan Carpenter wrote:
> The 'jack' variable was dereference before the NULL check so this patch 
> moves the dereference later.
> 
> regards,
> dan carpenter
> 
> Signed-off-by: Dan Carpenter <error27@gmail.com>
Acked-by: Liam Girdwood <lrg@slimlogic.co.uk>

> 
> --- orig/sound/soc/soc-jack.c	2009-11-14 11:04:04.000000000 +0200
> +++ devel/sound/soc/soc-jack.c	2009-11-14 11:05:01.000000000 +0200
> @@ -58,7 +58,7 @@
>   */
>  void snd_soc_jack_report(struct snd_soc_jack *jack, int status, int mask)
>  {
> -	struct snd_soc_codec *codec = jack->card->codec;
> +	struct snd_soc_codec *codec;
>  	struct snd_soc_jack_pin *pin;
>  	int enable;
>  	int oldstatus;
> @@ -67,6 +67,7 @@
>  		WARN_ON_ONCE(!jack);
>  		return;
>  	}
> +	codec = jack->card->codec;
>  
>  	mutex_lock(&codec->mutex);
>  

  reply	other threads:[~2009-11-16 10:36 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2009-11-16  9:06 [patch] move dereference after null check Dan Carpenter
2009-11-16 10:36 ` Liam Girdwood [this message]
2009-11-16 16:11 ` Mark Brown
2009-11-16 16:15   ` Takashi Iwai
2009-11-18  8:45   ` Dan Carpenter
  -- strict thread matches above, loose matches on Subject: below --
2009-11-10  8:55 Dan Carpenter
2009-11-10 14:19 ` James Bottomley

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=1258367809.3570.9.camel@odin \
    --to=lrg@slimlogic.co.uk \
    --cc=alsa-devel@alsa-project.org \
    --cc=broonie@opensource.wolfsonmicro.com \
    --cc=error27@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.