]> git.baikalelectronics.ru Git - kernel.git/commit
usb: dwc2: check return value after calling platform_get_resource()
authorYang Yingliang <yangyingliang@huawei.com>
Tue, 31 Aug 2021 08:42:36 +0000 (16:42 +0800)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Sat, 9 Oct 2021 12:39:49 +0000 (14:39 +0200)
commitdda4b4cc8bd71df1fa808d04d7e244e947a21fe4
tree5582ec1eda92b16737878b2947c9f88475322942
parent690c649dde8c9d126e3cf70d366e36bca5a1d134
usb: dwc2: check return value after calling platform_get_resource()

[ Upstream commit 856e6e8e0f9300befa87dde09edb578555c99a82 ]

It will cause null-ptr-deref if platform_get_resource() returns NULL,
we need check the return value.

Signed-off-by: Yang Yingliang <yangyingliang@huawei.com>
Link: https://lore.kernel.org/r/20210831084236.1359677-1-yangyingliang@huawei.com
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Signed-off-by: Sasha Levin <sashal@kernel.org>
drivers/usb/dwc2/hcd.c