From: Kees Cook <kees.cook@canonical.com>
To: linux-kernel@vger.kernel.org
Cc: devel@driverdev.osuosl.org, Greg Kroah-Hartman <gregkh@suse.de>,
Mauro Carvalho Chehab <mchehab@redhat.com>,
Stefan Ringel <stefan.ringel@arcor.de>,
Stephen Rothwell <sfr@canb.auug.org.au>
Subject: [PATCH] staging: fix possible use-before-NULL-check crash
Date: Wed, 6 Oct 2010 15:39:41 -0700 [thread overview]
Message-ID: <20101006223941.GW14666@outflux.net> (raw)
Found via http://coccinelle.lip6.fr/rules/mini_null_ref.cocci
Signed-off-by: Kees Cook <kees.cook@canonical.com>
---
drivers/staging/tm6000/tm6000-alsa.c | 3 ++-
1 files changed, 2 insertions(+), 1 deletions(-)
diff --git a/drivers/staging/tm6000/tm6000-alsa.c b/drivers/staging/tm6000/tm6000-alsa.c
index 087137d..c1aff0e 100644
--- a/drivers/staging/tm6000/tm6000-alsa.c
+++ b/drivers/staging/tm6000/tm6000-alsa.c
@@ -426,10 +426,11 @@ error:
static int tm6000_audio_fini(struct tm6000_core *dev)
{
- struct snd_tm6000_card *chip = dev->adev;
+ struct snd_tm6000_card *chip;
if (!dev)
return 0;
+ chip = dev->adev;
if (!chip)
return 0;
--
1.7.1
--
Kees Cook
Ubuntu Security Team
next reply other threads:[~2010-10-06 22:40 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2010-10-06 22:39 Kees Cook [this message]
2010-10-06 22:51 ` [PATCH] staging: fix possible use-before-NULL-check crash Greg KH
2010-10-07 0:12 ` Kees Cook
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=20101006223941.GW14666@outflux.net \
--to=kees.cook@canonical.com \
--cc=devel@driverdev.osuosl.org \
--cc=gregkh@suse.de \
--cc=linux-kernel@vger.kernel.org \
--cc=mchehab@redhat.com \
--cc=sfr@canb.auug.org.au \
--cc=stefan.ringel@arcor.de \
/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