]> git.proxmox.com Git - mirror_ubuntu-eoan-kernel.git/commitdiff
isdn: type bug in isdn_net_header()
authorDan Carpenter <dan.carpenter@oracle.com>
Thu, 9 Feb 2012 00:46:47 +0000 (00:46 +0000)
committerDavid S. Miller <davem@davemloft.net>
Thu, 9 Feb 2012 20:41:29 +0000 (15:41 -0500)
We use len to store the return value from eth_header().  eth_header()
can return -ETH_HLEN (-14).  We want to pass this back instead of
truncating it to 65522 and returning that.

Signed-off-by: Dan Carpenter <dan.carpenter@oracle.com>
Acked-by: Neil Horman <nhorman@tuxdriver.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
drivers/isdn/i4l/isdn_net.c

index 2339d7396b9ea305dd845e592d227bd726d3d43b..802ab87a78b662052bd2115f1d9bf4fc9ed5ae47 100644 (file)
@@ -1901,7 +1901,7 @@ static int isdn_net_header(struct sk_buff *skb, struct net_device *dev,
 {
        isdn_net_local *lp = netdev_priv(dev);
        unsigned char *p;
-       ushort len = 0;
+       int len = 0;
 
        switch (lp->p_encap) {
                case ISDN_NET_ENCAP_ETHER: