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:
6cf9515
)
ALSA: usb/6fire: Fix potential NULL pointer dereference in comm.c
author
Sachin Kamat
<sachin.kamat@linaro.org>
Wed, 21 Nov 2012 09:06:57 +0000
(14:36 +0530)
committer
Takashi Iwai
<tiwai@suse.de>
Wed, 21 Nov 2012 09:43:52 +0000
(10:43 +0100)
'rt' was dereferenced before the NULL check.
Moved the code after the check.
Signed-off-by: Sachin Kamat <sachin.kamat@linaro.org>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
sound/usb/6fire/comm.c
patch
|
blob
|
blame
|
history
diff --git
a/sound/usb/6fire/comm.c
b/sound/usb/6fire/comm.c
index 6c3d531a250efdc265acaf6bced48ab82aa32d05..1a75c36932d8e41747fddc9466db0ac11407d60a 100644
(file)
--- a/
sound/usb/6fire/comm.c
+++ b/
sound/usb/6fire/comm.c
@@
-129,12
+129,13
@@
int __devinit usb6fire_comm_init(struct sfire_chip *chip)
{
struct comm_runtime *rt = kzalloc(sizeof(struct comm_runtime),
GFP_KERNEL);
- struct urb *urb
= &rt->receiver
;
+ struct urb *urb;
int ret;
if (!rt)
return -ENOMEM;
+ urb = &rt->receiver;
rt->serial = 1;
rt->chip = chip;
usb_init_urb(urb);