summaryrefslogtreecommitdiff
path: root/mm
diff options
context:
space:
mode:
authorYang Yingliang <yangyingliang@huawei.com>2022-05-05 20:46:21 +0800
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>2022-05-18 09:15:44 +0200
commitd9252b82ee7a68090a5299f2679babcfca591a14 (patch)
treefd276c09111d8d1f9bec3efb8e01b893b29d223e /mm
parentf5f0de6f4245377fa2639c79d2d6ad22a564a5f5 (diff)
downloadlinux-d9252b82ee7a68090a5299f2679babcfca591a14.tar.gz
linux-d9252b82ee7a68090a5299f2679babcfca591a14.tar.bz2
linux-d9252b82ee7a68090a5299f2679babcfca591a14.zip
tty/serial: digicolor: fix possible null-ptr-deref in digicolor_uart_probe()
commit 447ee1516f19f534a228dda237eddb202f23e163 upstream. 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 'mm')
0 files changed, 0 insertions, 0 deletions