Re: [PATCH] staging: et131x: let the freeing of memory more reasonable in error path

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

 



I don't think this is the right thing because it is needless code.
Overall it doesn't really simplify anything.

You are worried that reviewers will be confused and think there is a
leak in et131x_rx_dma_memory_alloc() and then add a kfree() which breaks
the code.  I think you are right that a reviewer would initially wonder
why the code does not call kfree() but then you do a search for fb[0]
and it becomes obvious.

If we add your patch and the reviewer does a search for fb[0] then it is
confusing what the right thing to do is.

These kinds of "free later" code, are not the most common way to do
things in the kernel but they are used other places as well.

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