[alsa-devel] [PATCH] Uninitialized id returned by saffirepro_both_clk_src_get.

Takashi Sakamoto o-takashi at sakamocchi.jp
Mon Oct 27 14:41:13 CET 2014


Hi,

On Oct 27 2014 22 13  Takashi Iwai wrote:
> About the patch:
>>> +/* Value maps between registers and labels for SaffirePro 10/26. */
>>> +static const char saffirepro_clk_maps[][SAFFIREPRO_CLOCK_SOURCE_COUNT] = {
>>> +	/* SaffirePro 10 */
>>> +	[0] = {
>>> +		[SAFFIREPRO_CLOCK_SOURCE_INTERNAL]  =  0,
>>> +		[SAFFIREPRO_CLOCK_SOURCE_SKIP]      = -1, /* not supported */
> 
> If you need to handle a negative value, you must specify "signed
> char".  Without "signed" prefix, it might be unsigned, depending on
> the architecture, in the case of char.
>
>>>  static int
>>>  saffirepro_both_clk_src_get(struct snd_bebob *bebob, unsigned int *id)
>>>  {
>>>  	int err;
>>> -	u32 value;
>>> +	u32 value;       /* clock source read from hw register */
>>> +	const char *map;
> 
> Ditto.

Yep, exactly. I missed them...

Thanks for your indication and applying to the branch, C.C.ed to stable:
http://git.kernel.org/cgit/linux/kernel/git/tiwai/sound.git/commit/?h=for-linus&id=d1d0b6b668818571122d30d68a0b3f768bd83a52


Regards

Takashi Sakamoto
o-takashi at sakamocchi.jp



More information about the Alsa-devel mailing list