Re: [patch] brcm80211: brcmu_pkt_buf_free_skb() should handle NULL

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

On 05/15/2012 11:00 AM, Dan Carpenter wrote:
> This is potentially called with NULL pointers, for example, look at
> brcmf_c_prec_enq().  Since it's a free() function, probably people
> expect it to handle NULL pointers.

Acked-by: Arend van Spriel <arend@xxxxxxxxxxxx>

> Signed-off-by: Dan Carpenter <dan.carpenter@xxxxxxxxxx>
> diff --git a/drivers/net/wireless/brcm80211/brcmutil/utils.c b/drivers/net/wireless/brcm80211/brcmutil/utils.c
> index b45ab34..3e6405e 100644

Is the diff command filtered properly here. In most patches I usually
see '---' immediatly after the Signed-off-by line.

> --- a/drivers/net/wireless/brcm80211/brcmutil/utils.c
> +++ b/drivers/net/wireless/brcm80211/brcmutil/utils.c
> @@ -43,6 +43,8 @@ EXPORT_SYMBOL(brcmu_pkt_buf_get_skb);
>  /* Free the driver packet. Free the tag if present */
>  void brcmu_pkt_buf_free_skb(struct sk_buff *skb)
>  {
> +	if (!skb)
> +		return;
>  	WARN_ON(skb->next);
>  	if (skb->destructor)
>  		/* cannot kfree_skb() on hard IRQ (net/core/skbuff.c) if

Gr. AvS

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

[Linux Netdev]     [Kernel Newbies]     [Share Photos]     [IDE]     [Security]     [Git]     [Netfilter]     [Bugtraq]     [Photo]     [Yosemite]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Linux ATA RAID]     [Samba]     [Video 4 Linux]     [Device Mapper]     [Linux Resources]     [Free Dating]

Add to Google Powered by Linux