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>
This commit is contained in:
Ruan Jinjie 2023-08-05 12:56:30 +08:00 committed by Greg Kroah-Hartman
parent a647b414e0
commit af6248afd7

View File

@ -493,7 +493,7 @@ struct vudc_device *alloc_vudc_device(int devid)
udc_dev = kzalloc(sizeof(*udc_dev), GFP_KERNEL); udc_dev = kzalloc(sizeof(*udc_dev), GFP_KERNEL);
if (!udc_dev) if (!udc_dev)
goto out; return NULL;
INIT_LIST_HEAD(&udc_dev->dev_entry); INIT_LIST_HEAD(&udc_dev->dev_entry);
@ -503,7 +503,6 @@ struct vudc_device *alloc_vudc_device(int devid)
udc_dev = NULL; udc_dev = NULL;
} }
out:
return udc_dev; return udc_dev;
} }