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>
Tue, 21 Sep 2021 14:26:49 +0000 (16:26 +0200)
commit14651496a3de6807a17c310f63c894ea0c5d858e
tree1677baee467a73f81cbba17489ac713d430a22c2
parentc03d36995222400c1bbbb7245a233c4304cfc257
usb: musb: tusb6010: check return value after calling platform_get_resource()

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>
drivers/usb/musb/tusb6010.c