diff mbox series

[-next] usbip: simplify the return expression of usbip_core_init()

Message ID 20200915032631.1772673-1-liushixin2@huawei.com (mailing list archive)
State Accepted
Commit a4e6451d3214e160107a17304fb90fb11bd6513b
Headers show
Series [-next] usbip: simplify the return expression of usbip_core_init() | expand

Commit Message

Liu Shixin Sept. 15, 2020, 3:26 a.m. UTC
Simplify the return expression.

Signed-off-by: Liu Shixin <liushixin2@huawei.com>
---
 drivers/usb/usbip/usbip_common.c | 8 +-------
 1 file changed, 1 insertion(+), 7 deletions(-)

Comments

Shuah Khan Sept. 15, 2020, 4:37 p.m. UTC | #1
On 9/14/20 9:26 PM, Liu Shixin wrote:
> Simplify the return expression.
> 
> Signed-off-by: Liu Shixin <liushixin2@huawei.com>
> ---
>   drivers/usb/usbip/usbip_common.c | 8 +-------
>   1 file changed, 1 insertion(+), 7 deletions(-)
> 
> diff --git a/drivers/usb/usbip/usbip_common.c b/drivers/usb/usbip/usbip_common.c
> index e4b96674c405..4ce6c6a45eb1 100644
> --- a/drivers/usb/usbip/usbip_common.c
> +++ b/drivers/usb/usbip/usbip_common.c
> @@ -755,13 +755,7 @@ EXPORT_SYMBOL_GPL(usbip_recv_xbuff);
>   
>   static int __init usbip_core_init(void)
>   {
> -	int ret;
> -
> -	ret = usbip_init_eh();
> -	if (ret)
> -		return ret;
> -
> -	return 0;
> +	return usbip_init_eh();
>   }
>   
>   static void __exit usbip_core_exit(void)
> 

Looks good to me.

Acked-by: Shuah Khan <skhan@linuxfoundation.org>

thanks,
-- Shuah
diff mbox series

Patch

diff --git a/drivers/usb/usbip/usbip_common.c b/drivers/usb/usbip/usbip_common.c
index e4b96674c405..4ce6c6a45eb1 100644
--- a/drivers/usb/usbip/usbip_common.c
+++ b/drivers/usb/usbip/usbip_common.c
@@ -755,13 +755,7 @@  EXPORT_SYMBOL_GPL(usbip_recv_xbuff);
 
 static int __init usbip_core_init(void)
 {
-	int ret;
-
-	ret = usbip_init_eh();
-	if (ret)
-		return ret;
-
-	return 0;
+	return usbip_init_eh();
 }
 
 static void __exit usbip_core_exit(void)