diff options
| author | Yang Yingliang <yangyingliang@huawei.com> | 2022-04-29 16:26:36 +0800 |
|---|---|---|
| committer | Geert Uytterhoeven <geert+renesas@glider.be> | 2022-05-03 10:03:12 +0200 |
| commit | 5376e3d904532e657fd7ca1a9b1ff3d351527b90 (patch) | |
| tree | 3d77dfe5734c1b562896cbe7e6212f595105e826 /tools/perf/scripts/python | |
| parent | 8bdd369dba7ff2f89cfd723ca3a26602aae4e498 (diff) | |
pinctrl: renesas: core: Fix possible null-ptr-deref in sh_pfc_map_resources()
It will cause null-ptr-deref when using 'res', if platform_get_resource()
returns NULL, so move using 'res' after devm_ioremap_resource() that
will check it to avoid null-ptr-deref.
And use devm_platform_get_and_ioremap_resource() to simplify code.
Fixes: c7977ec4a336 ("pinctrl: sh-pfc: Convert to platform_get_*()")
Signed-off-by: Yang Yingliang <yangyingliang@huawei.com>
Link: https://lore.kernel.org/r/20220429082637.1308182-1-yangyingliang@huawei.com
Signed-off-by: Geert Uytterhoeven <geert+renesas@glider.be>
Diffstat (limited to 'tools/perf/scripts/python')
0 files changed, 0 insertions, 0 deletions
