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:
fbc020b
)
ALSA: emux: Delete two error messages for a failed memory allocation in snd_emux_crea...
author
Markus Elfring
<elfring@users.sourceforge.net>
Wed, 9 Aug 2017 07:30:34 +0000
(09:30 +0200)
committer
Takashi Iwai
<tiwai@suse.de>
Thu, 10 Aug 2017 15:55:13 +0000
(17:55 +0200)
Omit extra messages for a memory allocation failure in this function.
This issue was detected by using the Coccinelle software.
Link:
http://events.linuxfoundation.org/sites/events/files/slides/LCJ16-Refactor_Strings-WSang_0.pdf
Signed-off-by: Markus Elfring <elfring@users.sourceforge.net>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
sound/synth/emux/emux_seq.c
patch
|
blob
|
blame
|
history
diff --git
a/sound/synth/emux/emux_seq.c
b/sound/synth/emux/emux_seq.c
index fd6cbd439511d6355a7b2abde8a06167a8ff20ac..396c406d0f779e2d776524a8f9792fd9efafa14e 100644
(file)
--- a/
sound/synth/emux/emux_seq.c
+++ b/
sound/synth/emux/emux_seq.c
@@
-145,14
+145,12
@@
snd_emux_create_port(struct snd_emux *emu, char *name,
/* Allocate structures for this channel */
p = kzalloc(sizeof(*p), GFP_KERNEL);
- if (!p) {
- snd_printk(KERN_ERR "no memory\n");
+ if (!p)
return NULL;
- }
+
p->chset.channels = kcalloc(max_channels, sizeof(*p->chset.channels),
GFP_KERNEL);
if (!p->chset.channels) {
- snd_printk(KERN_ERR "no memory\n");
kfree(p);
return NULL;
}