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: 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 <ruanjinjie@huawei.com>
Link: https://lore.kernel.org/r/20230804093253.91647-6-ruanjinjie@huawei.com
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>

authored by

Ruan Jinjie and committed by
Greg Kroah-Hartman
b35935d6 9de17578

+1 -1
+1 -1
drivers/usb/usbip/vudc_dev.c
··· 489 489 490 490 struct vudc_device *alloc_vudc_device(int devid) 491 491 { 492 - struct vudc_device *udc_dev = NULL; 492 + struct vudc_device *udc_dev; 493 493 494 494 udc_dev = kzalloc(sizeof(*udc_dev), GFP_KERNEL); 495 495 if (!udc_dev)