Re: [PATCH net, 2/2] hv_netvsc: Fix error handling in netvsc_attach()

From: Markus Elfring
Date: Fri Nov 01 2019 - 16:15:03 EST


â
> +++ b/drivers/net/hyperv/netvsc_drv.c
> @@ -982,7 +982,7 @@ static int netvsc_attach(struct net_device *ndev,
> if (netif_running(ndev)) {
> ret = rndis_filter_open(nvdev);
> if (ret)
> - return ret;
> + goto err;
>
> rdev = nvdev->extension;
> if (!rdev->link_state)
â

I would prefer to specify the completed exception handling
(addition of two function calls) by a compound statement in
the shown if branch directly.

If you would insist to use a goto statement, I find an other label
more appropriate according to the Linux coding style.

Regards,
Markus