diff options
author | Dan Carpenter <[email protected]> | 2015-10-19 13:20:05 +0300 |
---|---|---|
committer | Brian Norris <[email protected]> | 2015-10-26 11:45:30 -0700 |
commit | 2382960793c2480277ae98a891ea5aa566e06ff1 (patch) | |
tree | 6ef6e74ad19631e7ba00bd1f2651446343e3967b /tools/perf/scripts/python/export-to-postgresql.py | |
parent | 89c1702da717164fcff633594e130f54dd563499 (diff) |
mtd: docg3: off by one in doc_register_sysfs()
Smatch found a bug in the error handling:
drivers/mtd/devices/docg3.c:1634 doc_register_sysfs()
error: buffer overflow 'doc_sys_attrs' 4 <= 4
The problem is that if the very last device_create_file() fails, then we
are beyond the end of the array. Actually, any time i == 3 then there
is a problem. We can fix this an simplify the code at the same time by
moving the !ret conditions out of the for loops and using a goto
instead.
Signed-off-by: Dan Carpenter <[email protected]>
Acked-by: Robert Jarzmik <[email protected]>
Signed-off-by: Brian Norris <[email protected]>
Diffstat (limited to 'tools/perf/scripts/python/export-to-postgresql.py')
0 files changed, 0 insertions, 0 deletions