From: Ruan Jinjie Date: Fri, 4 Aug 2023 09:32:53 +0000 (+0800) Subject: USB: usbip: Remove an unnecessary NULL value X-Git-Url: http://git.maquefel.me/?a=commitdiff_plain;h=b35935d66a3a25848519b9bffc1fca0b6b1004c5;p=linux.git USB: usbip: 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-6-ruanjinjie@huawei.com Signed-off-by: Greg Kroah-Hartman --- diff --git a/drivers/usb/usbip/vudc_dev.c b/drivers/usb/usbip/vudc_dev.c index 2bc428f2e2610..8e42839e60600 100644 --- a/drivers/usb/usbip/vudc_dev.c +++ b/drivers/usb/usbip/vudc_dev.c @@ -489,7 +489,7 @@ static void vudc_device_unusable(struct usbip_device *ud) struct vudc_device *alloc_vudc_device(int devid) { - struct vudc_device *udc_dev = NULL; + struct vudc_device *udc_dev; udc_dev = kzalloc(sizeof(*udc_dev), GFP_KERNEL); if (!udc_dev)