TencentOS-kernel/drivers/usb/gadget
Colin Ian King c4d7d3b33c usb: gadget: r8a66597: Add missing null check on return from platform_get_resource
[ Upstream commit 9c2076090c2815fe7c49676df68dde7e60a9b9fc ]

The call to platform_get_resource can potentially return a NULL pointer
on failure, so add this check and return -EINVAL if it fails.

Fixes: c41442474a26 ("usb: gadget: R8A66597 peripheral controller support.")
Signed-off-by: Colin Ian King <colin.king@canonical.com>
Addresses-Coverity: ("Dereference null return")
Link: https://lore.kernel.org/r/20210406184510.433497-1-colin.king@canonical.com
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Signed-off-by: Sasha Levin <sashal@kernel.org>
2021-05-20 16:07:50 +08:00
..
function usb: gadget/function/f_fs string table fix for multiple languages 2021-05-20 16:07:37 +08:00
legacy usb: webcam: Invalid size of Processing Unit Descriptor 2021-05-20 16:07:23 +08:00
udc usb: gadget: r8a66597: Add missing null check on return from platform_get_resource 2021-05-20 16:07:50 +08:00
Kconfig usb: gadget: select CONFIG_CRC32 2021-04-12 12:51:12 +08:00
Makefile Init Repo base on linux 5.4.32 long term, and add base tlinux kernel interfaces. 2021-03-16 11:01:34 +08:00
composite.c USB: replace hardcode maximum usb string length by definition 2021-04-12 12:53:18 +08:00
config.c usb: gadget: Fix double free of device descriptor pointers 2021-05-20 16:07:36 +08:00
configfs.c usb: gadget: configfs: Fix KASAN use-after-free 2021-04-12 12:53:18 +08:00
configfs.h Init Repo base on linux 5.4.32 long term, and add base tlinux kernel interfaces. 2021-03-16 11:01:34 +08:00
epautoconf.c Init Repo base on linux 5.4.32 long term, and add base tlinux kernel interfaces. 2021-03-16 11:01:34 +08:00
functions.c Init Repo base on linux 5.4.32 long term, and add base tlinux kernel interfaces. 2021-03-16 11:01:34 +08:00
u_f.c Init Repo base on linux 5.4.32 long term, and add base tlinux kernel interfaces. 2021-03-16 11:01:34 +08:00
u_f.h USB: gadget: u_f: Unbreak offset calculation in VLAs 2021-03-16 16:35:17 +08:00
u_os_desc.h Init Repo base on linux 5.4.32 long term, and add base tlinux kernel interfaces. 2021-03-16 11:01:34 +08:00
usbstring.c USB: replace hardcode maximum usb string length by definition 2021-04-12 12:53:18 +08:00