From ebc243372842a81dddbe00bd047a25b8ee7d8b87 Mon Sep 17 00:00:00 2001 From: Andre Noll Date: Fri, 11 Jul 2008 22:02:20 +1000 Subject: [PATCH] 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 --- drivers/md/md.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/md/md.c b/drivers/md/md.c index 20e03db8fd..9756ea0a19 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; -- 2.39.5