1
0
Fork 0

RDMA/ipoib: Fix return code from ipoib_cm_dev_init

The proper return code is -EOPNOTSUPP and not -ENOSYS when the function
isn't supported, also make sure to return the right error code
from ipoib_transport_dev_init() when ipoib_cm_dev_init() is supported.

Signed-off-by: Kamal Heib <kamalheib1@gmail.com>
Signed-off-by: Jason Gunthorpe <jgg@mellanox.com>
hifive-unleashed-5.1
Kamal Heib 2018-07-09 22:21:03 +03:00 committed by Jason Gunthorpe
parent 07e7056aff
commit 3fda243245
2 changed files with 3 additions and 3 deletions

View File

@ -729,7 +729,7 @@ void ipoib_cm_dev_stop(struct net_device *dev)
static inline
int ipoib_cm_dev_init(struct net_device *dev)
{
return -ENOSYS;
return -EOPNOTSUPP;
}
static inline

View File

@ -168,8 +168,8 @@ int ipoib_transport_dev_init(struct net_device *dev, struct ib_device *ca)
else
size += ipoib_recvq_size * ipoib_max_conn_qp;
} else
if (ret != -ENOSYS)
return -ENODEV;
if (ret != -EOPNOTSUPP)
return ret;
req_vec = (priv->port - 1) * 2;