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

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

 



On Sat, May 30, 2015 at 11:12:01AM +0530, Sudip Mukherjee wrote:
> 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

Ok Sudip.I never knew of the strict option.I will fix and send a v2

thanks & regards
hari prasath
_______________________________________________
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