staging: lustre: return -EEXIST if NI is not unique
authorAmir Shehata <amir.shehata@intel.com>
Mon, 22 Feb 2016 22:29:14 +0000 (17:29 -0500)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Tue, 23 Feb 2016 02:05:49 +0000 (18:05 -0800)
commit5af8a05e8f51cc1f6d581f384593c38d78872a18
tree32ece368c6ff38d971ed1afcbe0ebc5b1064089f
parent445c6a1eb97fc76f9d3082e777a0d187a5ccefd8
staging: lustre: return -EEXIST if NI is not unique

Return -EEXIST and not -EINVAL when trying to add a
network interface which is not unique.

Some minor cleanup in api-ni.c

Signed-off-by: Amir Shehata <amir.shehata@intel.com>
Intel-bug-id: https://jira.hpdd.intel.com/browse/LU-5875
Reviewed-on: http://review.whamcloud.com/13056
Reviewed-by: Isaac Huang <he.huang@intel.com>
Reviewed-by: James Simmons <uja.ornl@gmail.com>
Reviewed-by: Oleg Drokin <oleg.drokin@intel.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/staging/lustre/lnet/lnet/api-ni.c