summaryrefslogtreecommitdiff
path: root/drivers/usb
diff options
context:
space:
mode:
authorRuan Jinjie <ruanjinjie@huawei.com>2023-08-05 12:56:30 +0800
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>2023-08-08 10:36:51 +0200
commitaf6248afd7653924d224b3fa8843fc93fdbb93b6 (patch)
treeb5f98714920f80fd030c122bf640218e39db63f9 /drivers/usb
parenta647b414e05370b29a5140c526a3db693051273e (diff)
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>
Diffstat (limited to 'drivers/usb')
-rw-r--r--drivers/usb/usbip/vudc_dev.c3
1 files changed, 1 insertions, 2 deletions
diff --git a/drivers/usb/usbip/vudc_dev.c b/drivers/usb/usbip/vudc_dev.c
index 8e42839e6060..44b04c54c086 100644
--- a/drivers/usb/usbip/vudc_dev.c
+++ b/drivers/usb/usbip/vudc_dev.c
@@ -493,7 +493,7 @@ struct vudc_device *alloc_vudc_device(int devid)
udc_dev = kzalloc(sizeof(*udc_dev), GFP_KERNEL);
if (!udc_dev)
- goto out;
+ return NULL;
INIT_LIST_HEAD(&udc_dev->dev_entry);
@@ -503,7 +503,6 @@ struct vudc_device *alloc_vudc_device(int devid)
udc_dev = NULL;
}
-out:
return udc_dev;
}