diff options
| author | Yang Yingliang <[email protected]> | 2022-04-25 09:08:26 +0000 |
|---|---|---|
| committer | Joerg Roedel <[email protected]> | 2022-04-28 09:38:44 +0000 |
| commit | a15932f4377062364d22096afe25bc579134a1c3 (patch) | |
| tree | 5cdf4260383fbf806c69c1bd271dd5c7dd30ee94 /tools/perf/scripts/python/mem-phys-addr.py | |
| parent | Merge tag 'arm-smmu-fixes' of git://git.kernel.org/pub/scm/linux/kernel/git/w... (diff) | |
| download | kernel-a15932f4377062364d22096afe25bc579134a1c3.tar.gz kernel-a15932f4377062364d22096afe25bc579134a1c3.zip | |
iommu/dart: check return value after calling platform_get_resource()
It will cause null-ptr-deref in resource_size(), if platform_get_resource()
returns NULL, move calling resource_size() after devm_ioremap_resource() that
will check 'res' to avoid null-ptr-deref.
And use devm_platform_get_and_ioremap_resource() to simplify code.
Fixes: 46d1fb072e76 ("iommu/dart: Add DART iommu driver")
Signed-off-by: Yang Yingliang <[email protected]>
Reviewed-by: Sven Peter <[email protected]>
Link: https://lore.kernel.org/r/[email protected]
Signed-off-by: Joerg Roedel <[email protected]>
Diffstat (limited to 'tools/perf/scripts/python/mem-phys-addr.py')
0 files changed, 0 insertions, 0 deletions
