diff options
author | Kamal Heib <kamalheib1@gmail.com> | 2019-09-23 13:41:56 +0300 |
---|---|---|
committer | Jason Gunthorpe <jgg@mellanox.com> | 2019-10-01 13:06:10 -0300 |
commit | d0f3ef36bf49bbc7de04da0d7f65ef95749b8b30 (patch) | |
tree | 4d7e4fc9c3ca83c1a88cd22cd3a23fced4260bcc /drivers/infiniband/core/sysfs.c | |
parent | RDMA/siw: Fix port number endianness in a debug message (diff) | |
download | linux-dev-d0f3ef36bf49bbc7de04da0d7f65ef95749b8b30.tar.xz linux-dev-d0f3ef36bf49bbc7de04da0d7f65ef95749b8b30.zip |
RDMA/core: Fix return code when modify_device isn't supported
The proper return code is "-EOPNOTSUPP" when modify_device callback is not
supported.
Link: https://lore.kernel.org/r/20190923104158.5331-2-kamalheib1@gmail.com
Signed-off-by: Kamal Heib <kamalheib1@gmail.com>
Reviewed-by: Jason Gunthorpe <jgg@mellanox.com>
Signed-off-by: Jason Gunthorpe <jgg@mellanox.com>
Diffstat (limited to 'drivers/infiniband/core/sysfs.c')
-rw-r--r-- | drivers/infiniband/core/sysfs.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/infiniband/core/sysfs.c b/drivers/infiniband/core/sysfs.c index 7a50cedcef1f..92c932c067cb 100644 --- a/drivers/infiniband/core/sysfs.c +++ b/drivers/infiniband/core/sysfs.c @@ -1268,7 +1268,7 @@ static ssize_t node_desc_store(struct device *device, int ret; if (!dev->ops.modify_device) - return -EIO; + return -EOPNOTSUPP; memcpy(desc.node_desc, buf, min_t(int, count, IB_DEVICE_NODE_DESC_MAX)); ret = ib_modify_device(dev, IB_DEVICE_MODIFY_NODE_DESC, &desc); |