Re: [patch] isdn: type bug in isdn_net_header()

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Thu, Feb 09, 2012 at 01:46:47PM +0300, Dan Carpenter wrote:
> 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@xxxxxxxxxx>
> ---
> WARNING: Compile tested only.  I don't have this hardware.  Please check
> that I am on the right track.
> 
> diff --git a/drivers/isdn/i4l/isdn_net.c b/drivers/isdn/i4l/isdn_net.c
> index 2339d73..802ab87 100644
> --- a/drivers/isdn/i4l/isdn_net.c
> +++ b/drivers/isdn/i4l/isdn_net.c
> @@ -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:
> 
Looks reasonable
Acked-by: Neil Horman <nhorman@xxxxxxxxxxxxx>

--
To unsubscribe from this list: send the line "unsubscribe kernel-janitors" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html


[Index of Archives]     [Kernel Development]     [Kernel Announce]     [Kernel Newbies]     [Linux Networking Development]     [Share Photos]     [IDE]     [Security]     [Git]     [Netfilter]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Device Mapper]

  Powered by Linux