Re: [PATCH V1 net-next 1/1] hyperv: Enable sendbuf mechanism on the send path

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

 



On Wed, Apr 30, 2014 at 10:14:31AM -0700, K. Y. Srinivasan wrote:
> +	/* Setup state for managing the send buffer. */
> +	net_device->map_words = DIV_ROUND_UP(net_device->send_section_cnt,
> +					     BITS_PER_LONG);
> +
> +	net_device->send_section_map =
> +		kzalloc(net_device->map_words * sizeof(ulong), GFP_KERNEL);
> +	if (net_device->send_section_map == NULL)
> +		goto cleanup;

I told you about this returning success bug if kmalloc() fails but you
didn't fix it.

> +
>  	goto exit;
>  
>  cleanup:
> -	netvsc_destroy_recv_buf(net_device);
> +	netvsc_destroy_buf(net_device);
>  
>  exit:
>  	return ret;

regards,
dan carpenter
_______________________________________________
devel mailing list
devel@xxxxxxxxxxxxxxxxxxxxxx
http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-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