]> git.proxmox.com Git - mirror_ubuntu-jammy-kernel.git/commit
usb: host: ohci-tmio: check return value after calling platform_get_resource()
authorYang Yingliang <yangyingliang@huawei.com>
Mon, 11 Oct 2021 13:49:20 +0000 (21:49 +0800)
committerAndrea Righi <andrea.righi@canonical.com>
Tue, 7 Dec 2021 06:34:01 +0000 (07:34 +0100)
commit862e3ec40fd550bf594a220a9c4d0619985089a5
tree3faa3fb532e9edc6b1dae0cba79a98db360fe344
parent75d41528397b15ceda39a7477e346843d81833df
usb: host: ohci-tmio: check return value after calling platform_get_resource()

BugLink: https://bugs.launchpad.net/bugs/1952579
[ Upstream commit 9eff2b2e59fda25051ab36cd1cb5014661df657b ]

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

Acked-by: Alan Stern <stern@rowland.harvard.edu>
Signed-off-by: Yang Yingliang <yangyingliang@huawei.com>
Link: https://lore.kernel.org/r/20211011134920.118477-1-yangyingliang@huawei.com
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Signed-off-by: Sasha Levin <sashal@kernel.org>
Signed-off-by: Andrea Righi <andrea.righi@canonical.com>
drivers/usb/host/ohci-tmio.c