diff options
author | Alban Bedel <[email protected]> | 2019-01-28 15:55:02 +0000 |
---|---|---|
committer | Greg Kroah-Hartman <[email protected]> | 2019-01-31 16:24:14 +0100 |
commit | 1c83267473b881cf75247acf1129456ef33aba86 (patch) | |
tree | 4f070f823fed0fbb446221a19388429f549fb200 /tools/perf/scripts/python/export-to-postgresql.py | |
parent | 5087cc198e545ff9974b20daf2d43658f7711aa0 (diff) |
nvmem: core: Fix cell lookup when no cell is found
If the cell list is not empty and nvmem_find_cell_by_node/name() is
called for a cell that is not present in the list they will return an
invalid pointer instead of NULL. This happen because
list_for_each_entry() stop once it reach the list head again, but as
the list head is not contained in a struct nvmem_cell the iteration
variable then contains an invalid value.
This is easily solved by using a variable to iterate over the list and
one to return the cell found.
Signed-off-by: Alban Bedel <[email protected]>
Signed-off-by: Srinivas Kandagatla <[email protected]>
Signed-off-by: Greg Kroah-Hartman <[email protected]>
Diffstat (limited to 'tools/perf/scripts/python/export-to-postgresql.py')
0 files changed, 0 insertions, 0 deletions