summaryrefslogtreecommitdiffstats
path: root/drivers/md
diff options
context:
space:
mode:
authorAndre Noll <maan@systemlinux.org>2008-07-11 14:02:20 +0200
committerNeil Brown <neilb@suse.de>2008-07-11 14:02:20 +0200
commitebc243372842a81dddbe00bd047a25b8ee7d8b87 (patch)
tree8c362c91d8628b1362b7abb8abcd0a1e7ca7803c /drivers/md
parentmd: Simplify sb_equal(). (diff)
downloadlinux-ebc243372842a81dddbe00bd047a25b8ee7d8b87.tar.xz
linux-ebc243372842a81dddbe00bd047a25b8ee7d8b87.zip
md: alloc_disk_sb(): Return proper error value.
If alloc_page() fails, ENOMEM is a more suitable error value than EINVAL. Signed-off-by: Andre Noll <maan@systemlinux.org> Signed-off-by: Neil Brown <neilb@suse.de>
Diffstat (limited to 'drivers/md')
-rw-r--r--drivers/md/md.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/md/md.c b/drivers/md/md.c
index 20e03db8fdfc..9756ea0a19b9 100644
--- a/drivers/md/md.c
+++ b/drivers/md/md.c
@@ -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;