net: ipmr: move the tbl id check in ipmr_new_table
authorNikolay Aleksandrov <nikolay@cumulusnetworks.com>
Sat, 21 Nov 2015 14:57:24 +0000 (15:57 +0100)
committerDavid S. Miller <davem@davemloft.net>
Mon, 23 Nov 2015 20:06:37 +0000 (15:06 -0500)
commit1113ebbcf9e43c80fe5ef05c48b4cd1c25b306b2
tree1480a9304cdc5fd6825cce5dd2a9275e74520ee7
parent930d3142b87a5c08b4dd00a97d503b6d412a9fda
net: ipmr: move the tbl id check in ipmr_new_table

Move the table id check in ipmr_new_table and make it return error
pointer. We need this change for the upcoming netlink table manipulation
support in order to avoid code duplication and a race condition.

Signed-off-by: Nikolay Aleksandrov <nikolay@cumulusnetworks.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
net/ipv4/ipmr.c