Re: USB: hub: Delete an error message for a failed memory allocation in usb_hub_clear_tt_buffer()

From: Joe Perches
Date: Thu Dec 07 2017 - 11:21:19 EST


On Thu, 2017-12-07 at 10:12 -0500, Alan Stern wrote:
> The real problem is that the kernel development community doesn't have
> a fixed policy on how to handle memory allocation errors.
[]
> If there was one agreed-upon policy, then we could definitively point
> to old code and say "That's wrong, and here is how it should be fixed."
> But currently this is not possible, and we end up with repetitive
> discussions like this one that aren't of general use.

Well stated.

My preferred policy would be to remove all the individual
allocation failure messages and only use the generic
warn_alloc()/dump_stack() mechanism.