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 goto

When udc_dev = NULL, it is not necessary to goto out to return, just
return NULL directly. And the out goto label can be removed.

Signed-off-by: Ruan Jinjie <ruanjinjie@huawei.com>
Reviewed-by: Shuah Khan <skhan@linuxfoundation.org>
Link: https://lore.kernel.org/r/20230805045631.1858638-1-ruanjinjie@huawei.com
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>

authored by

Ruan Jinjie and committed by
Greg Kroah-Hartman
af6248af a647b414

+1 -2
+1 -2
drivers/usb/usbip/vudc_dev.c
··· 493 493 494 494 udc_dev = kzalloc(sizeof(*udc_dev), GFP_KERNEL); 495 495 if (!udc_dev) 496 - goto out; 496 + return NULL; 497 497 498 498 INIT_LIST_HEAD(&udc_dev->dev_entry); 499 499 ··· 503 503 udc_dev = NULL; 504 504 } 505 505 506 - out: 507 506 return udc_dev; 508 507 } 509 508