mirror of
https://github.com/BobTheBlinker/android_kernel_motorola_sm6375.git
synced 2026-10-29 03:01:39 -04:00
alpha: silence a buffer overflow warning
We check that "member" is in bounds for the first line, but we also use it on the next line without checking which is a mistake. Signed-off-by: Dan Carpenter <[email protected]> Signed-off-by: Matt Turner <[email protected]>
This commit is contained in:
parent
b5a3a128b4
commit
03e1f04414
1 changed files with 3 additions and 2 deletions
|
|
@ -1094,8 +1094,9 @@ get_sysnames(unsigned long type, unsigned long variation, unsigned long cpu,
|
|||
default: /* default to variation "0" for now */
|
||||
break;
|
||||
case ST_DEC_EB164:
|
||||
if (member < ARRAY_SIZE(eb164_indices))
|
||||
*variation_name = eb164_names[eb164_indices[member]];
|
||||
if (member >= ARRAY_SIZE(eb164_indices))
|
||||
break;
|
||||
*variation_name = eb164_names[eb164_indices[member]];
|
||||
/* PC164 may show as EB164 variation, but with EV56 CPU,
|
||||
so, since no true EB164 had anything but EV5... */
|
||||
if (eb164_indices[member] == 0 && cpu == EV56_CPU)
|
||||
|
|
|
|||
Loading…
Reference in a new issue