ALSA: bebob: use the right string length in check_audiophile_booted()
PATCH 1/1 ALSA: bebob: use the right string length in check_audiophile_booted()
Function check_audiophile_booted() only compares 15 characters of the 24-character-long string "FW Audiophile Bootloader" with the firmware model name. As this seems to be incorrect and because there is no comment explaining this "15", fix the length which is used in strncmp().
This patch has only been compile-tested.
Fixes 9076c22ddd9d ("ALSA: bebob: Add support for M-Audio usual
Firewire series")
Signed-off-by Nicolas Iooss <[email protected]>
--- sound/firewire/bebob/bebob.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
sound/firewire/bebob/bebob.c +1 -1
@@ -177,7 +177,7 @@ check_audiophile_booted(struct fw_unit *unit)if (fw_csr_string (unit->directory,CSR_MODEL , name,sizeof (name)) <0 )return false; -return strncmp (name,"FW Audiophile Bootloader" ,15 ) !=0 ; +return strncmp (name,"FW Audiophile Bootloader" ,24 ) !=0 ; } static void
Signature · 1 line
2.10.1