projects
/
powerpc.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
| inline |
side by side
Merge nommu branch
[powerpc.git]
/
drivers
/
usb
/
input
/
map_to_7segment.h
diff --git
a/drivers/usb/input/map_to_7segment.h
b/drivers/usb/input/map_to_7segment.h
index
52ff27f
..
a424094
100644
(file)
--- a/
drivers/usb/input/map_to_7segment.h
+++ b/
drivers/usb/input/map_to_7segment.h
@@
-79,7
+79,7
@@
struct seg7_conversion_map {
static inline int map_to_seg7(struct seg7_conversion_map *map, int c)
{
- return c
& 0x7f
? map->table[c] : -EINVAL;
+ return c
>= 0 && c < sizeof(map->table)
? map->table[c] : -EINVAL;
}
#define SEG7_CONVERSION_MAP(_name, _map) \