Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > linux.kernel > #1196399 > unrolled thread

Re: [PATCH] netcp:Fix error checking in the function gbe_open

Started byMurali Karicheri <m-karicheri2@ti.com>
First post2015-07-30 21:50 +0200
Last post2015-07-30 21:50 +0200
Articles 1 — 1 participant

Back to article view | Back to linux.kernel

This discussion starts older than the indexed window; earlier articles aren't shown. The article labeled Started by below is the oldest one visible, not the original post.


Contents

  Re: [PATCH] netcp:Fix error checking in the function gbe_open Murali Karicheri <m-karicheri2@ti.com> - 2015-07-30 21:50 +0200

#1196399 — Re: [PATCH] netcp:Fix error checking in the function gbe_open

FromMurali Karicheri <m-karicheri2@ti.com>
Date2015-07-30 21:50 +0200
SubjectRe: [PATCH] netcp:Fix error checking in the function gbe_open
Message-ID<pS202-83R-7@gated-at.bofh.it>
On 07/30/2015 02:27 PM, Nicholas Krause wrote:
> This fixes error checking in the function gbe_open by checking if
> the function netcp_register_txhook has failed by returning a error
> code and if so jump to the goto label fail for handling internal
> failures in this function.
>
> Signed-off-by: Nicholas Krause <xerofoify@gmail.com>
> ---
>   drivers/net/ethernet/ti/netcp_ethss.c | 6 ++++--
>   1 file changed, 4 insertions(+), 2 deletions(-)
>
> diff --git a/drivers/net/ethernet/ti/netcp_ethss.c b/drivers/net/ethernet/ti/netcp_ethss.c
> index 9b7e0a3..e81e66b 100644
> --- a/drivers/net/ethernet/ti/netcp_ethss.c
> +++ b/drivers/net/ethernet/ti/netcp_ethss.c
> @@ -2257,8 +2257,10 @@ static int gbe_open(void *intf_priv, struct net_device *ndev)
>   	if (ret)
>   		goto fail;
>
> -	netcp_register_txhook(netcp, GBE_TXHOOK_ORDER, gbe_tx_hook,
> -			      gbe_intf);
> +	ret = netcp_register_txhook(netcp, GBE_TXHOOK_ORDER, gbe_tx_hook,
> +				    gbe_intf);
> +	if (ret)
> +		goto fail;
>
>   	slave->open = true;
>   	netcp_ethss_update_link_state(gbe_dev, slave, ndev);
>
Acked-by: Murali Karicheri <m-karicheri2@ti.com>

-- 
Murali Karicheri
Linux Kernel, Keystone
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

[toc] | [standalone]


Back to top | Article view | linux.kernel


csiph-web