USB: host: isp116x: check return value after calling platform_get_resource()
authorZhen Ni <nizhen@uniontech.com>
Wed, 2 Mar 2022 03:37:16 +0000 (11:37 +0800)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Tue, 14 Jun 2022 16:36:20 +0000 (18:36 +0200)
commit3592cfd8b848bf0c4d7740d78a87a7b8f6e1fa9a
tree2b235c98e9059e2c0f45d90c645ca6f9281fa3f0
parentfef451f0fbbe85dbd2962b18379d02e2965610db
USB: host: isp116x: check return value after calling platform_get_resource()

[ Upstream commit 134a3408c2d3f7e23eb0e4556e0a2d9f36c2614e ]

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

Signed-off-by: Zhen Ni <nizhen@uniontech.com>
Link: https://lore.kernel.org/r/20220302033716.31272-1-nizhen@uniontech.com
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Signed-off-by: Sasha Levin <sashal@kernel.org>
drivers/usb/host/isp116x-hcd.c