From: Andre Noll Date: Fri, 11 Jul 2008 12:02:20 +0000 (+1000) Subject: md: alloc_disk_sb(): Return proper error value. X-Git-Tag: v2.6.27-rc1~957^2~15 X-Git-Url: http://pilppa.com/gitweb/?a=commitdiff_plain;h=ebc243372842a81dddbe00bd047a25b8ee7d8b87;p=linux-2.6-omap-h63xx.git 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 Signed-off-by: Neil Brown --- diff --git a/drivers/md/md.c b/drivers/md/md.c index 20e03db8fdf..9756ea0a19b 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;