From: Murali Karicheri <m-karicheri2@ti.com>
To: Nicholas Krause <xerofoify@gmail.com>, <w-kwok2@ti.com>
Cc: <netdev@vger.kernel.org>, <linux-kernel@vger.kernel.org>
Subject: Re: [PATCH] netcp:Fix error checking in the function gbe_open
Date: Thu, 30 Jul 2015 15:44:35 -0400 [thread overview]
Message-ID: <55BA7EA3.9020204@ti.com> (raw)
In-Reply-To: <1438280850-9613-1-git-send-email-xerofoify@gmail.com>
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
next parent reply other threads:[~2015-07-30 19:44 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
[not found] <1438280850-9613-1-git-send-email-xerofoify@gmail.com>
2015-07-30 19:44 ` Murali Karicheri [this message]
[not found] ` <55CCB713.8000406@gmail.com>
2015-08-20 22:05 ` [PATCH] netcp:Fix error checking in the function gbe_open Murali Karicheri
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=55BA7EA3.9020204@ti.com \
--to=m-karicheri2@ti.com \
--cc=linux-kernel@vger.kernel.org \
--cc=netdev@vger.kernel.org \
--cc=w-kwok2@ti.com \
--cc=xerofoify@gmail.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).