netcp:Fix error checking in the function gbe_open
Subsystems (2)
A message that is not in the archive (sent off-list or not yet received): [email protected]
Murali Karicheri
Acked-byQuoted 18 lines · Nicholas Krause
This fixes error checking in the function
gbe_openby checking if the functionnetcp_register_txhookhas 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 <[email protected]>--- drivers/net/ethernet/ti/netcp_ethss.c | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-)drivers/net/ethernet/ti/netcp_ethss.c +0
-0@@ -2257,8 +2257,10 @@ static int gbe_open(void *intf_priv, struct net_device *ndev)if (ret) goto fail;
drivers/net/ethernet/ti/netcp_ethss.c static int gbe_open(void *intf_priv, struct net_device *ndev) · line 2266
Quoted 10 lines
drivers/net/ethernet/ti/netcp_ethss.c +4
-2-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);
Signature · 2 lines
Murali Karicheri Linux Kernel, Keystone
A message that is not in the archive (sent off-list or not yet received): [email protected]
Quoted 34 lines · nick
Quoted 26 lines · Murali Karicheri
Quoted 25 lines · Nicholas Krause
This fixes error checking in the function
gbe_openby checking if the functionnetcp_register_txhookhas 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 <[email protected]>--- drivers/net/ethernet/ti/netcp_ethss.c | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-)drivers/net/ethernet/ti/netcp_ethss.c +4
-2@@ -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;Quoted 5 lines
drivers/net/ethernet/ti/netcp_ethss.c static int gbe_open(void *intf_priv, struct net_device *ndev) · line 2266
Quoted 3 lines
drivers/net/ethernet/ti/netcp_ethss.c +0
-0slave->open = true;netcp_ethss_update_link_state (gbe_dev, slave, ndev);Acked-by Murali Karicheri <[email protected]>
Quoted 6 lines
Murali,
I was wondering if this patch is being merged as I haven't seen in move into David's network tree with the merged of your driver's tree.
Nick
Nick,
Not sure what else I need to do to get it applied to net repo.
David,
Can this be applied to net/master ?
Thanks
Signature · 2 lines
Murali Karicheri Linux Kernel, Keystone