]> 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>
Tue, 14 Sep 2021 08:32:56 +0000 (10:32 +0200)
commit856e6e8e0f9300befa87dde09edb578555c99a82
tree162056664d5bfd4df98f64e27d96c2b07301fa63
parentb69ec50b3e55c4b2a85c8bc46763eaf330605847
usb: dwc2: 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/20210831084236.1359677-1-yangyingliang@huawei.com
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/usb/dwc2/hcd.c