Re: [PATCH 06/12] staging: dgnc: removes kzalloc error statements

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

 



On Sat, Aug 31, 2013 at 06:19:14PM -0400, Lidza Louina wrote:
> This patch removes the error statements that follow
> kzalloc. These are useless because kzalloc has its
> own error statement and the driver's error handling
> would never actually happen.
> 

Gar!  Wait!  What?  I'm sorry, I was totally unclear on that.  These
things totally can happen (once every thousand years) and we need to
handle them.

Don't bother with an error message but do clean up and return the error
code.

This was my bad.  I appologize for setting you on the wrong path.

Some allocation failures are easier to trigger than others.  We handle
them all the same way, with a cleanup and return an error.  If we start
handling some one way and some another way then it means that we have to
sort through which errors are important and which are only theoretical.
Sorting is more of a pain than just fixing everything no matter how
minor.

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