Re: Input: usbtouchscreen - Return directly after a failed kmalloc() in nexio_init()

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

 



>> The kfree() function was called in one case by
>> the nexio_init() function during error handling
>> even if the passed variable contained a null pointer.
>
> Which is perfectly valid thing to do, like free(), kfree() accepts NULL argument.

I find such a function call with this special parameter not so useful.


>> Thus return directly after a call of the function “kmalloc” failed
>> at the beginning.
>
> This is simply a matter of preference, the original author preferred
> that style, I see no objective reason to change it.

Would you ever like to avoid redundant data processing a bit more?

Regards,
Markus





[Index of Archives]     [Linux Media Devel]     [Linux USB Devel]     [Video for Linux]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]     [Linux Wireless Networking]     [Linux Omap]

  Powered by Linux