usb: chipidea: udc: Remove an unnecessary NULL value
authorRuan Jinjie <ruanjinjie@huawei.com>
Fri, 4 Aug 2023 09:32:51 +0000 (17:32 +0800)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Fri, 4 Aug 2023 12:48:55 +0000 (14:48 +0200)
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-4-ruanjinjie@huawei.com
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/usb/chipidea/udc.c

index d58355427eeb139afb137852b0e92565c4392b3d..0b7bd3c643c3aa4d40fcb5612ec1ea3595f025ea 100644 (file)
@@ -1463,7 +1463,7 @@ static int ep_disable(struct usb_ep *ep)
  */
 static struct usb_request *ep_alloc_request(struct usb_ep *ep, gfp_t gfp_flags)
 {
-       struct ci_hw_req *hwreq = NULL;
+       struct ci_hw_req *hwreq;
 
        if (ep == NULL)
                return NULL;