summaryrefslogtreecommitdiffstats
path: root/sound
diff options
context:
space:
mode:
authorDan Carpenter <dan.carpenter@oracle.com>2014-12-12 22:28:10 +0300
committerTakashi Iwai <tiwai@suse.de>2014-12-14 16:04:50 +0100
commit0d3aba30b755fe9ccaf390f0e71f6fb9fd55bd87 (patch)
treed876b22571cf2dfa00d67a2a40af55e69888dfa2 /sound
parent6e1d7a51392f06899bd7b693f28ac60fa1e00032 (diff)
downloadlinux-0d3aba30b755fe9ccaf390f0e71f6fb9fd55bd87.tar.bz2
ALSA: oxfw: fix detect_loud_models() return value
This code causes a static checker warning: sound/firewire/oxfw/oxfw.c:46 detect_loud_models() warn: signedness bug returning '(-2)' The detect_loud_models() function should return false on falure, so that we don't try to set up the loud code for hardware that doesn't support it. Signed-off-by: Dan Carpenter <dan.carpenter@oracle.com> Reviewed-by: Takashi Sakamoto <o-takashi@sakamocchi.jp> Signed-off-by: Takashi Iwai <tiwai@suse.de>
Diffstat (limited to 'sound')
-rw-r--r--sound/firewire/oxfw/oxfw.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/sound/firewire/oxfw/oxfw.c b/sound/firewire/oxfw/oxfw.c
index cf1d0b55e827..60e5cad0531a 100644
--- a/sound/firewire/oxfw/oxfw.c
+++ b/sound/firewire/oxfw/oxfw.c
@@ -43,7 +43,7 @@ static bool detect_loud_models(struct fw_unit *unit)
err = fw_csr_string(unit->directory, CSR_MODEL,
model, sizeof(model));
if (err < 0)
- return err;
+ return false;
for (i = 0; i < ARRAY_SIZE(models); i++) {
if (strcmp(models[i], model) == 0)