aboutsummaryrefslogtreecommitdiffstats
path: root/fs/xfs/xfs_ioctl.c
diff options
context:
space:
mode:
Diffstat (limited to 'fs/xfs/xfs_ioctl.c')
-rw-r--r--fs/xfs/xfs_ioctl.c5
1 files changed, 3 insertions, 2 deletions
diff --git a/fs/xfs/xfs_ioctl.c b/fs/xfs/xfs_ioctl.c
index 0b18776b075e..2d8f4fdf07f9 100644
--- a/fs/xfs/xfs_ioctl.c
+++ b/fs/xfs/xfs_ioctl.c
@@ -543,10 +543,11 @@ xfs_attrmulti_by_handle(
543 543
544 ops = memdup_user(am_hreq.ops, size); 544 ops = memdup_user(am_hreq.ops, size);
545 if (IS_ERR(ops)) { 545 if (IS_ERR(ops)) {
546 error = PTR_ERR(ops); 546 error = -PTR_ERR(ops);
547 goto out_dput; 547 goto out_dput;
548 } 548 }
549 549
550 error = ENOMEM;
550 attr_name = kmalloc(MAXNAMELEN, GFP_KERNEL); 551 attr_name = kmalloc(MAXNAMELEN, GFP_KERNEL);
551 if (!attr_name) 552 if (!attr_name)
552 goto out_kfree_ops; 553 goto out_kfree_ops;
@@ -556,7 +557,7 @@ xfs_attrmulti_by_handle(
556 ops[i].am_error = strncpy_from_user((char *)attr_name, 557 ops[i].am_error = strncpy_from_user((char *)attr_name,
557 ops[i].am_attrname, MAXNAMELEN); 558 ops[i].am_attrname, MAXNAMELEN);
558 if (ops[i].am_error == 0 || ops[i].am_error == MAXNAMELEN) 559 if (ops[i].am_error == 0 || ops[i].am_error == MAXNAMELEN)
559 error = -ERANGE; 560 error = ERANGE;
560 if (ops[i].am_error < 0) 561 if (ops[i].am_error < 0)
561 break; 562 break;
562 563