From: Andre Noll Date: Fri, 11 Jul 2008 12:02:20 +0000 (+1000) Subject: md: alloc_disk_sb(): Return proper error value. X-Git-Url: https://git.karo-electronics.de/?a=commitdiff_plain;h=ebc243372842a81dddbe00bd047a25b8ee7d8b87;p=linux-beck.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 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;