projects
/
GitHub
/
moto-9609
/
android_kernel_motorola_exynos9610.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
66efdc7
)
ALSA: asihpi - fix potential NULL pointer dereference
author
Wei Yongjun
<yongjun_wei@trendmicro.com.cn>
Mon, 11 Mar 2013 16:16:40 +0000
(
00:16
+0800)
committer
Takashi Iwai
<tiwai@suse.de>
Tue, 12 Mar 2013 07:34:36 +0000
(08:34 +0100)
The dereference should be moved below the NULL test.
Signed-off-by: Wei Yongjun <yongjun_wei@trendmicro.com.cn>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
sound/pci/asihpi/asihpi.c
patch
|
blob
|
blame
|
history
diff --git
a/sound/pci/asihpi/asihpi.c
b/sound/pci/asihpi/asihpi.c
index 3536b076b529ab8c25edf1292a62e713e841b800..0aabfedeecbae241b6ab4e182713a3d2e85b82e8 100644
(file)
--- a/
sound/pci/asihpi/asihpi.c
+++ b/
sound/pci/asihpi/asihpi.c
@@
-2549,7
+2549,7
@@
static int snd_asihpi_sampleclock_add(struct snd_card_asihpi *asihpi,
static int snd_card_asihpi_mixer_new(struct snd_card_asihpi *asihpi)
{
- struct snd_card *card
= asihpi->card
;
+ struct snd_card *card;
unsigned int idx = 0;
unsigned int subindex = 0;
int err;
@@
-2557,6
+2557,7
@@
static int snd_card_asihpi_mixer_new(struct snd_card_asihpi *asihpi)
if (snd_BUG_ON(!asihpi))
return -EINVAL;
+ card = asihpi->card;
strcpy(card->mixername, "Asihpi Mixer");
err =