Skip to content

Commit

Permalink
ALSA: oxfw: fix detect_loud_models() return value
Browse files Browse the repository at this point in the history
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>
  • Loading branch information
Dan Carpenter authored and Takashi Iwai committed Dec 14, 2014
1 parent 6e1d7a5 commit 0d3aba3
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion sound/firewire/oxfw/oxfw.c
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down

0 comments on commit 0d3aba3

Please sign in to comment.