From: Dan Carpenter Date: Fri, 14 May 2010 14:50:05 +0000 (+0200) Subject: ALSA: asihpi: incorrect range check X-Git-Tag: v2.6.35-rc1~478^2~4^2~1 X-Git-Url: https://git.karo-electronics.de/?a=commitdiff_plain;h=1be1d76b8a1f622fd3a64778dfe117053f2af1f2;p=karo-tx-linux.git ALSA: asihpi: incorrect range check The entity_type_to_size[] array has LAST_ENTITY_TYPE (11) number of elements, not LAST_ENTITY_ROLE (17). This only affects the debug output. Signed-off-by: Dan Carpenter Signed-off-by: Takashi Iwai --- diff --git a/sound/pci/asihpi/hpifunc.c b/sound/pci/asihpi/hpifunc.c index 15f0c7ea0e52..eda26b312324 100644 --- a/sound/pci/asihpi/hpifunc.c +++ b/sound/pci/asihpi/hpifunc.c @@ -3407,7 +3407,7 @@ u16 hpi_entity_alloc_and_pack(const enum e_entity_type type, if (hE) return hE; - HPI_DEBUG_ASSERT(role > entity_role_null && type < LAST_ENTITY_ROLE); + HPI_DEBUG_ASSERT(role > entity_role_null && type < LAST_ENTITY_TYPE); bytes_to_copy = entity_type_to_size[type] * item_count; total_size = hpi_entity_header_size(*entity) + bytes_to_copy;