Re: [PATCH 1/7] staging/ozwpan: Fix sparse warning Using plain integer as NULL pointer

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

 



On Fri, Feb 15, 2013 at 06:25:29AM +0100, Peter Huewe wrote:
> This patch fixes the warning "Using plain integer as NULL pointer",
> generated by sparse, by replacing the offending 0s with NULL.
> 
> Signed-off-by: Peter Huewe <peterhuewe@xxxxxx>

Don't send 7 patches with the same subject.

> @@ -455,7 +455,7 @@ int oz_prepare_frame(struct oz_pd *pd, int empty)
>   */
>  static struct sk_buff *oz_build_frame(struct oz_pd *pd, struct oz_tx_frame *f)
>  {
> -	struct sk_buff *skb = 0;
> +	struct sk_buff *skb = NULL;

This initialization could just be removed.

>  	struct net_device *dev = pd->net_dev;
>  	struct oz_hdr *oz_hdr;
>  	struct oz_elt *elt;
> @@ -464,8 +464,8 @@ static struct sk_buff *oz_build_frame(struct oz_pd *pd, struct oz_tx_frame *f)
>  	 * as the space we need.
>  	 */
>  	skb = alloc_skb(f->total_size + OZ_ALLOCATED_SPACE(dev), GFP_ATOMIC);
> -	if (skb == 0)
> -		return 0;
> +	if (skb == NULL)
> +		return NULL;

regards,
dan carpenter

_______________________________________________
devel mailing list
devel@xxxxxxxxxxxxxxxxxxxxxx
http://driverdev.linuxdriverproject.org/mailman/listinfo/devel


[Index of Archives]     [Linux Driver Backports]     [DMA Engine]     [Linux GPIO]     [Linux SPI]     [Video for Linux]     [Linux USB Devel]     [Linux Coverity]     [Linux Audio Users]     [Linux Kernel]     [Linux SCSI]     [Yosemite Backpacking]
  Powered by Linux