Skip to content

Commit 12f7bd2

Browse files
GUO Zihuakuba-moo
authored andcommitted
net: broadcom: Fix return type for implementation of
Since Linux now supports CFI, it will be a good idea to fix mismatched return type for implementation of hooks. Otherwise this might get cought out by CFI and cause a panic. bcm4908_enet_start_xmit() would return either NETDEV_TX_BUSY or NETDEV_TX_OK, so change the return type to netdev_tx_t directly. Signed-off-by: GUO Zihua <[email protected]> Reviewed-by: Florian Fainelli <[email protected]> Link: https://lore.kernel.org/r/[email protected] Signed-off-by: Jakub Kicinski <[email protected]>
1 parent 8254393 commit 12f7bd2

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

drivers/net/ethernet/broadcom/bcm4908_enet.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -507,7 +507,7 @@ static int bcm4908_enet_stop(struct net_device *netdev)
507507
return 0;
508508
}
509509

510-
static int bcm4908_enet_start_xmit(struct sk_buff *skb, struct net_device *netdev)
510+
static netdev_tx_t bcm4908_enet_start_xmit(struct sk_buff *skb, struct net_device *netdev)
511511
{
512512
struct bcm4908_enet *enet = netdev_priv(netdev);
513513
struct bcm4908_enet_dma_ring *ring = &enet->tx_ring;

0 commit comments

Comments
 (0)