Message ID | d79df5b0063f1e2e9d448b3d712bbc050cf7ebc1.1376847403.git.ydroneaud@opteya.com (mailing list archive) |
---|---|
State | Rejected |
Headers | show |
diff --git a/drivers/infiniband/core/ucm.c b/drivers/infiniband/core/ucm.c index f2f6393..e462208 100644 --- a/drivers/infiniband/core/ucm.c +++ b/drivers/infiniband/core/ucm.c @@ -432,7 +432,7 @@ static ssize_t ib_ucm_event(struct ib_ucm_file *file, if (uevent->data) { if (cmd.data_len < uevent->data_len) { - result = -ENOMEM; + result = -ENOSPC; goto done; } if (copy_to_user((void __user *)(unsigned long)cmd.data, @@ -444,7 +444,7 @@ static ssize_t ib_ucm_event(struct ib_ucm_file *file, if (uevent->info) { if (cmd.info_len < uevent->info_len) { - result = -ENOMEM; + result = -ENOSPC; goto done; } if (copy_to_user((void __user *)(unsigned long)cmd.info,
When output buffer is too small, others infiniband functions returns ENOSPC. This patch changes ib_ucm_event() to returns ENOSPC just like others functions. Signed-off-by: Yann Droneaud <ydroneaud@opteya.com> Link: http://mid.gmane.org/cover.1376847403.git.ydroneaud@opteya.com --- drivers/infiniband/core/ucm.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-)