diff options
| author | 2022-05-05 20:46:21 +0800 | |
|---|---|---|
| committer | 2022-05-05 22:58:36 +0200 | |
| commit | 447ee1516f19f534a228dda237eddb202f23e163 (patch) | |
| tree | 0704920d093e635b5fc95643e915ef55d95dbbca /scripts/gcc-plugins/gcc-generate-simple_ipa-pass.h | |
| parent | Linux 5.18-rc5 (diff) | |
| download | linux-dev-447ee1516f19f534a228dda237eddb202f23e163.tar.xz linux-dev-447ee1516f19f534a228dda237eddb202f23e163.zip | |
tty/serial: digicolor: fix possible null-ptr-deref in digicolor_uart_probe()
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: 5930cb3511df ("serial: driver for Conexant Digicolor USART")
Signed-off-by: Yang Yingliang <yangyingliang@huawei.com>
Reviewed-by: Baruch Siach <baruch@tkos.co.il>
Cc: stable <stable@vger.kernel.org>
Link: https://lore.kernel.org/r/20220505124621.1592697-1-yangyingliang@huawei.com
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Diffstat (limited to 'scripts/gcc-plugins/gcc-generate-simple_ipa-pass.h')
0 files changed, 0 insertions, 0 deletions
