Re: [patch 2/2] ALSA: oxfw: fix detect_loud_models() return value

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Dec 13 2014 04:28, Dan Carpenter wrote:
> 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@xxxxxxxxxx>
> 
> diff --git a/sound/firewire/oxfw/oxfw.c b/sound/firewire/oxfw/oxfw.c
> index cf1d0b5..60e5cad 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)

Reviewd-by: Takashi Sakamoto <o-takashi@xxxxxxxxxxxxx>


Thanks

Takashi Sakamoto
o-takashi@xxxxxxxxxxxxx
--
To unsubscribe from this list: send the line "unsubscribe kernel-janitors" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html




[Index of Archives]     [Kernel Development]     [Kernel Announce]     [Kernel Newbies]     [Linux Networking Development]     [Share Photos]     [IDE]     [Security]     [Git]     [Netfilter]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Device Mapper]

  Powered by Linux