aboutsummaryrefslogtreecommitdiffstats
path: root/tools/perf/scripts/python/libxed.py
diff options
context:
space:
mode:
authorLuiz Sampaio <[email protected]>2021-11-09 22:07:32 +0000
committerMiguel Ojeda <[email protected]>2021-11-24 10:46:52 +0000
commit4daa9ff89ef27be43c15995412d6aee393a78200 (patch)
tree6be42ed28dfed32cd06e1bfcf334246827a8bd3a /tools/perf/scripts/python/libxed.py
parentauxdisplay: charlcd: fixing coding style issue (diff)
downloadkernel-4daa9ff89ef27be43c15995412d6aee393a78200.tar.gz
kernel-4daa9ff89ef27be43c15995412d6aee393a78200.zip
auxdisplay: charlcd: checking for pointer reference before dereferencing
Check if the pointer lcd->ops->init_display exists before dereferencing it. If a driver called charlcd_init() without defining the ops, this would return segmentation fault, as happened to me when implementing a charlcd driver. Checking the pointer before dereferencing protects from segmentation fault. Signed-off-by: Luiz Sampaio <[email protected]> Signed-off-by: Miguel Ojeda <[email protected]>
Diffstat (limited to 'tools/perf/scripts/python/libxed.py')
0 files changed, 0 insertions, 0 deletions