summaryrefslogtreecommitdiffstats
path: root/sound/core
diff options
context:
space:
mode:
authorTakashi Iwai <tiwai@suse.de>2013-10-28 12:54:52 +0100
committerTakashi Iwai <tiwai@suse.de>2013-10-29 11:37:42 +0100
commit60f6fef877d52525b8887d27cfacf74a279e3e12 (patch)
treebf3744c3967ff8fbdcb24a6eb1e88685c5078b2c /sound/core
parent1f96153bc613c526f5ea39a7f366b3bdf70249be (diff)
downloadop-kernel-dev-60f6fef877d52525b8887d27cfacf74a279e3e12.zip
op-kernel-dev-60f6fef877d52525b8887d27cfacf74a279e3e12.tar.gz
ALSA: Optimize module name check
module->name is a fixed array, so we can check the empty contents straightforwardly in module_slot_match(). Spotted by coverity CID 1056786. Signed-off-by: Takashi Iwai <tiwai@suse.de>
Diffstat (limited to 'sound/core')
-rw-r--r--sound/core/init.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/sound/core/init.c b/sound/core/init.c
index 6b90871..01a8938 100644
--- a/sound/core/init.c
+++ b/sound/core/init.c
@@ -66,7 +66,7 @@ static int module_slot_match(struct module *module, int idx)
#ifdef MODULE
const char *s1, *s2;
- if (!module || !module->name || !slots[idx])
+ if (!module || !*module->name || !slots[idx])
return 0;
s1 = module->name;
OpenPOWER on IntegriCloud