usb: musb: tusb6010: check return value after calling platform_get_resource()
authorYang Yingliang <yangyingliang@huawei.com>
Wed, 15 Sep 2021 03:49:25 +0000 (11:49 +0800)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Fri, 26 Nov 2021 10:48:40 +0000 (11:48 +0100)
commitb3f43659eb0b9af2e6ef18a8d829374610b19e7a
tree63c9f43fa288e34ed4e7d05299f2088ee5f3da5c
parentec70d80a8642900086447ba0cdc79e3f44d42e8f
usb: musb: tusb6010: check return value after calling platform_get_resource()

[ Upstream commit 14651496a3de6807a17c310f63c894ea0c5d858e ]

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/20210915034925.2399823-1-yangyingliang@huawei.com
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Signed-off-by: Sasha Levin <sashal@kernel.org>
drivers/usb/musb/tusb6010.c