aboutsummaryrefslogtreecommitdiff
path: root/tools/perf/scripts/python
diff options
context:
space:
mode:
authorJiasheng Jiang <jiasheng@iscas.ac.cn>2021-12-31 17:44:19 +0800
committerBjorn Andersson <bjorn.andersson@linaro.org>2022-01-31 15:57:00 -0600
commit5a811126d38f9767a20cc271b34db7c8efc5a46c (patch)
tree9e5a00293f67b3cdf86f422e942ead048ec9043c /tools/perf/scripts/python
parenta5d32f6d2e59a654036d5a4f59d9202302b23388 (diff)
soc: qcom: rpmpd: Check for null return of devm_kcalloc
Because of the possible failure of the allocation, data->domains might be NULL pointer and will cause the dereference of the NULL pointer later. Therefore, it might be better to check it and directly return -ENOMEM without releasing data manually if fails, because the comment of the devm_kmalloc() says "Memory allocated with this function is automatically freed on driver detach.". Fixes: bbe3a66c3f5a ("soc: qcom: rpmpd: Add a Power domain driver to model corners") Signed-off-by: Jiasheng Jiang <jiasheng@iscas.ac.cn> Signed-off-by: Bjorn Andersson <bjorn.andersson@linaro.org> Link: https://lore.kernel.org/r/20211231094419.1941054-1-jiasheng@iscas.ac.cn
Diffstat (limited to 'tools/perf/scripts/python')
0 files changed, 0 insertions, 0 deletions