Re: [PATCH] staging: dgnc: check return value before using pointer

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

 



On Thu, May 28, 2015 at 12:35:22PM +0000, Gujulan Elango, Hari Prasath (H.) wrote:
> Check the return value of kcalloc first and then use the pointer.
> 
> Signed-off-by: Gujulan Elango Hari Prasath <hgujulan@xxxxxxxxxxx>
> ---
<snip>
> -
> -	if (!brd->msgbuf) {
> +	if (!brd->msgbuf_head) {
>  		kfree(brd);
>  		return -ENOMEM;
>  	}
>  
> +	brd->msgbuf = brd->msgbuf_head;
> +
> +
checkpatch with --strict complains about multiple blank lines.

regards
sudip
_______________________________________________
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