Commit 3fda2432 authored by Kamal Heib's avatar Kamal Heib Committed by Jason Gunthorpe

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: default avatarKamal Heib <kamalheib1@gmail.com>
Signed-off-by: default avatarJason Gunthorpe <jgg@mellanox.com>
parent 07e7056a
...@@ -729,7 +729,7 @@ void ipoib_cm_dev_stop(struct net_device *dev) ...@@ -729,7 +729,7 @@ void ipoib_cm_dev_stop(struct net_device *dev)
static inline static inline
int ipoib_cm_dev_init(struct net_device *dev) int ipoib_cm_dev_init(struct net_device *dev)
{ {
return -ENOSYS; return -EOPNOTSUPP;
} }
static inline static inline
......
...@@ -168,8 +168,8 @@ int ipoib_transport_dev_init(struct net_device *dev, struct ib_device *ca) ...@@ -168,8 +168,8 @@ int ipoib_transport_dev_init(struct net_device *dev, struct ib_device *ca)
else else
size += ipoib_recvq_size * ipoib_max_conn_qp; size += ipoib_recvq_size * ipoib_max_conn_qp;
} else } else
if (ret != -ENOSYS) if (ret != -EOPNOTSUPP)
return -ENODEV; return ret;
req_vec = (priv->port - 1) * 2; req_vec = (priv->port - 1) * 2;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment