summaryrefslogtreecommitdiffstats
path: root/kernel/drivers/net/ethernet/ti/cpmac.c
diff options
context:
space:
mode:
Diffstat (limited to 'kernel/drivers/net/ethernet/ti/cpmac.c')
-rw-r--r--kernel/drivers/net/ethernet/ti/cpmac.c5
1 files changed, 3 insertions, 2 deletions
diff --git a/kernel/drivers/net/ethernet/ti/cpmac.c b/kernel/drivers/net/ethernet/ti/cpmac.c
index 77d26fe28..d52ea3008 100644
--- a/kernel/drivers/net/ethernet/ti/cpmac.c
+++ b/kernel/drivers/net/ethernet/ti/cpmac.c
@@ -549,7 +549,8 @@ fatal_error:
static int cpmac_start_xmit(struct sk_buff *skb, struct net_device *dev)
{
- int queue, len;
+ int queue;
+ unsigned int len;
struct cpmac_desc *desc;
struct cpmac_priv *priv = netdev_priv(dev);
@@ -559,7 +560,7 @@ static int cpmac_start_xmit(struct sk_buff *skb, struct net_device *dev)
if (unlikely(skb_padto(skb, ETH_ZLEN)))
return NETDEV_TX_OK;
- len = max(skb->len, ETH_ZLEN);
+ len = max_t(unsigned int, skb->len, ETH_ZLEN);
queue = skb_get_queue_mapping(skb);
netif_stop_subqueue(dev, queue);