[PATCH] uml: fix mcast network driver error handling
authorPaolo 'Blaisorblade' Giarrusso <blaisorblade@yahoo.it>
Mon, 14 Nov 2005 00:07:07 +0000 (16:07 -0800)
committerLinus Torvalds <torvalds@g5.osdl.org>
Mon, 14 Nov 2005 02:14:14 +0000 (18:14 -0800)
commitc50d2c4d6685db9b45cf6521046296df5bc42592
treef02d30dff1e3ca9793c69bf6ba2b0ee01c4e1a6b
parent85977376c73b7712ed3618888ade126075888c06
[PATCH] uml: fix mcast network driver error handling

printk clears the host errno (I verified this in debugging and it's reasonable
enough, given that it ends via a write call on some fd, especially since
printk() goes on /dev/tty0 which is often the host stdout).  So save errno
earlier.  There's no reason to change the printk calls to use -err rather than
errno - the assignment can't clear errno.

And in the first failure path, we used to return 0 too (and this time more
clearly), which is totally wrong.  0 is a success fd, which is then registered
and gives a "registering fd twice" warning.

Finally, fix up some whitespace.

Signed-off-by: Paolo 'Blaisorblade' Giarrusso <blaisorblade@yahoo.it>
Acked-by: Jeff Dike <jdike@addtoit.com>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
arch/um/drivers/mcast_user.c