net, ppp: Report correct error code if unit allocation failed
authorCyrill Gorcunov <gorcunov@gmail.com>
Tue, 23 Nov 2010 11:43:44 +0000 (11:43 +0000)
committerDavid S. Miller <davem@davemloft.net>
Sun, 28 Nov 2010 19:33:49 +0000 (11:33 -0800)
commitbcc70bb3aeae7c3d035881d41055685f08a2b745
treed315f22c30a9356f8294669bb9c9cf31f844ff12
parent3c6f27bf33052ea6ba9d82369fb460726fb779c0
net, ppp: Report correct error code if unit allocation failed

Allocating unit from ird might return several error codes
not only -EAGAIN, so it should not be changed and returned
precisely. Same time unit release procedure should be invoked
only if device is unregistering.

Signed-off-by: Cyrill Gorcunov <gorcunov@openvz.org>
CC: Paul Mackerras <paulus@samba.org>
Signed-off-by: David S. Miller <davem@davemloft.net>
drivers/net/ppp_generic.c