From: Dan Carpenter Date: Wed, 28 May 2014 16:43:30 +0000 (+0300) Subject: ALSA: bebob: sizeof() vs ARRAY_SIZE() typo X-Git-Url: https://git.stricted.de/?a=commitdiff_plain;h=33a5f989de41622ae691b12f008390309b59ad74;p=GitHub%2FLineageOS%2Fandroid_kernel_motorola_exynos9610.git ALSA: bebob: sizeof() vs ARRAY_SIZE() typo ARRAY_SIZE() was intended here instead of sizeof(). The "bridgeco_freq_table" array holds integers so the original condition is never true. Signed-off-by: Dan Carpenter Reviewd-by: Takashi Sakamoto Tested-by: Takashi Sakamoto Signed-off-by: Takashi Iwai --- diff --git a/sound/firewire/bebob/bebob_stream.c b/sound/firewire/bebob/bebob_stream.c index 514c7c9fa1cd..bc4f82776fda 100644 --- a/sound/firewire/bebob/bebob_stream.c +++ b/sound/firewire/bebob/bebob_stream.c @@ -749,7 +749,7 @@ parse_stream_formation(u8 *buf, unsigned int len, if (buf[2] == bridgeco_freq_table[i]) break; } - if (i == sizeof(bridgeco_freq_table)) + if (i == ARRAY_SIZE(bridgeco_freq_table)) return -ENOSYS; /* Avoid double count by different entries for the same rate. */