diff options
author | hayeswang <hayeswang@realtek.com> | 2013-07-12 10:26:15 +0200 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2013-07-13 01:13:34 +0200 |
commit | 3ff25e3c4531aff5b1a96e2ea6e1a2d355263019 (patch) | |
tree | e9f93b286fb74bcbd610d2f099d51f94d82e05d3 /drivers | |
parent | net: access page->private by using page_private (diff) | |
download | linux-3ff25e3c4531aff5b1a96e2ea6e1a2d355263019.tar.xz linux-3ff25e3c4531aff5b1a96e2ea6e1a2d355263019.zip |
usb/net/r8152: fix integer overflow in expression
config: make ARCH=avr32 allyesconfig
drivers/net/usb/r8152.c: In function 'rtl8152_start_xmit':
drivers/net/usb/r8152.c:956: warning: integer overflow in expression
955 memset(tx_desc, 0, sizeof(*tx_desc));
> 956 tx_desc->opts1 = cpu_to_le32((len & TX_LEN_MASK) | TX_FS | TX_LS);
957 tp->tx_skb = skb;
Signed-off-by: Hayes Wang <hayeswang@realtek.com>
Spotted-by: kbuild test robot <fengguang.wu@intel.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'drivers')
-rw-r--r-- | drivers/net/usb/r8152.c | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/drivers/net/usb/r8152.c b/drivers/net/usb/r8152.c index d02bac82fc57..ee13f9eb740c 100644 --- a/drivers/net/usb/r8152.c +++ b/drivers/net/usb/r8152.c @@ -934,7 +934,8 @@ static netdev_tx_t rtl8152_start_xmit(struct sk_buff *skb, struct r8152 *tp = netdev_priv(netdev); struct net_device_stats *stats = rtl8152_get_stats(netdev); struct tx_desc *tx_desc; - int len, res; + unsigned int len; + int res; netif_stop_queue(netdev); len = skb->len; |