22 Dec
2011
22 Dec
'11
9:48 a.m.
On Thu, 2011-12-22 at 09:44 +0100, Takashi Iwai wrote:
You can use WARN() or snd_BUG_ON().
But WARN or snd_BUG_ON will continue execution and.... So better log it and return error, right?
Only question is in these scenarios this is core corruption so what would be the apt error code to use?
Well, there is no standard definition. Just use a sensible errno that will abort the user-space appropriately (i.e. not like EPIPE). Even -EFAULT would be OK, I think.
I like EFAULT
--
~Vinod