datapath: Correctly return error if percpu allocation fails.
authorJesse Gross <jesse@nicira.com>
Mon, 13 Dec 2010 23:21:28 +0000 (15:21 -0800)
committerJesse Gross <jesse@nicira.com>
Tue, 14 Dec 2010 00:08:23 +0000 (16:08 -0800)
commit94947cd83a796c4bf5a77fdf488662d0a0681c18
tree981747029c6fd1d045db72614bbf2dfcfd493b1c
parent39376d06ffe60b4352e7d1a6f0a8d3b662d9aa39
datapath: Correctly return error if percpu allocation fails.

If the allocation of percpu stats fails when creating a new
datapath, we currently don't return the correct error code.  Since
we don't explicitly set it when the allocation fails it will keep
the value from the previous call.  This means we will return success
when the creation actually failed.

Signed-off-by: Jesse Gross <jesse@nicira.com>
Acked-by: Ben Pfaff <blp@nicira.com>
datapath/datapath.c