Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux
1
fork

Configure Feed

Select the types of activity you want to include in your feed.

usb: musb: Remove an unnecessary NULL value

The NULL initialization of the pointers assigned by kzalloc() first is
not necessary, because if the kzalloc() failed, the pointers will be
assigned NULL, otherwise it works as usual. so remove it.

Signed-off-by: Ruan Jinjie <ruanjinjie@huawei.com>
Link: https://lore.kernel.org/r/20230804093253.91647-5-ruanjinjie@huawei.com
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>

authored by

Ruan Jinjie and committed by
Greg Kroah-Hartman
9de17578 708368fb

+1 -1
+1 -1
drivers/usb/musb/musb_gadget.c
··· 1130 1130 struct usb_request *musb_alloc_request(struct usb_ep *ep, gfp_t gfp_flags) 1131 1131 { 1132 1132 struct musb_ep *musb_ep = to_musb_ep(ep); 1133 - struct musb_request *request = NULL; 1133 + struct musb_request *request; 1134 1134 1135 1135 request = kzalloc(sizeof *request, gfp_flags); 1136 1136 if (!request)