diff options
| author | Yang Yingliang <[email protected]> | 2022-10-29 09:38:25 +0000 |
|---|---|---|
| committer | Wolfram Sang <[email protected]> | 2022-12-07 20:19:32 +0000 |
| commit | 2d47b79d2bd39cc6369eccf94a06568d84c906ae (patch) | |
| tree | 1630226ed3b13b719cb4dea2c0c39227f78bc6a3 /drivers/gpu/drm/amd/amdgpu/amdgpu_gem.c | |
| parent | i2c: xiic: Make sure to disable clock on .remove() (diff) | |
| download | kernel-2d47b79d2bd39cc6369eccf94a06568d84c906ae.tar.gz kernel-2d47b79d2bd39cc6369eccf94a06568d84c906ae.zip | |
i2c: mux: reg: 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: b3fdd32799d8 ("i2c: mux: Add register-based mux i2c-mux-reg")
Signed-off-by: Yang Yingliang <[email protected]>
Signed-off-by: Wolfram Sang <[email protected]>
Diffstat (limited to 'drivers/gpu/drm/amd/amdgpu/amdgpu_gem.c')
0 files changed, 0 insertions, 0 deletions
