Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit ebc24337 authored by Andre Noll's avatar Andre Noll Committed by Neil Brown
Browse files

md: alloc_disk_sb(): Return proper error value.



If alloc_page() fails, ENOMEM is a more suitable error value
than EINVAL.

Signed-off-by: default avatarAndre Noll <maan@systemlinux.org>
Signed-off-by: default avatarNeil Brown <neilb@suse.de>
parent ce0c8e05
Loading
Loading
Loading
Loading
+1 −1
Original line number Diff line number Diff line
@@ -372,7 +372,7 @@ static int alloc_disk_sb(mdk_rdev_t * rdev)
	rdev->sb_page = alloc_page(GFP_KERNEL);
	if (!rdev->sb_page) {
		printk(KERN_ALERT "md: out of memory.\n");
		return -EINVAL;
		return -ENOMEM;
	}

	return 0;