From: Ruan Jinjie Date: Fri, 4 Aug 2023 09:32:52 +0000 (+0800) Subject: usb: musb: Remove an unnecessary NULL value X-Git-Tag: v6.6-rc1~103^2~61 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=9de17578b912f39e818035a217efd82a98cd26a6;p=thirdparty%2Flinux.git 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 Link: https://lore.kernel.org/r/20230804093253.91647-5-ruanjinjie@huawei.com Signed-off-by: Greg Kroah-Hartman --- diff --git a/drivers/usb/musb/musb_gadget.c b/drivers/usb/musb/musb_gadget.c index 31c44325e8287..051c6da7cf6d7 100644 --- a/drivers/usb/musb/musb_gadget.c +++ b/drivers/usb/musb/musb_gadget.c @@ -1130,7 +1130,7 @@ static int musb_gadget_disable(struct usb_ep *ep) struct usb_request *musb_alloc_request(struct usb_ep *ep, gfp_t gfp_flags) { struct musb_ep *musb_ep = to_musb_ep(ep); - struct musb_request *request = NULL; + struct musb_request *request; request = kzalloc(sizeof *request, gfp_flags); if (!request)