aboutsummaryrefslogtreecommitdiff
path: root/tools/perf/scripts/python/export-to-postgresql.py
diff options
context:
space:
mode:
authorAlban Bedel <[email protected]>2019-01-28 15:55:04 +0000
committerGreg Kroah-Hartman <[email protected]>2019-01-31 16:24:14 +0100
commit95b65195d571ab589a6d6893a418922757e06399 (patch)
treeee111e025dff984fb7d70f8debb4a506c8c30f8d /tools/perf/scripts/python/export-to-postgresql.py
parentd4e7fef1a9a5d2bf3f859ba9f50f4d5409a09ab0 (diff)
nvmem: core: Always reference the device returned by nvmem_device_get()
In nvmem_device_get(), when the device lookup fails with DT it currently fallback on nvmem_find() which is wrong for two reasons. First nvmem_find() return NULL when nothing is found instead of an ERR_PTR. But nvmem_find() also just lookup the device, it doesn't reference the module and increment the reference count like it is done in the DT path. To fix this we replace the call to nvmem_find() with a call to __nvmem_device_get() which does all the referencing and return a proper ERR_PTR in case of error. 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