[PATCH] hfsplus: use -ENOMEM when kzalloc failed

From: Namjae Jeon
Date: Wed Jun 06 2012 - 08:26:08 EST


Use -ENOMEM return value instead of -EINVAL when kzalloc failed

Signed-off-by: Namjae Jeon <linkinjeon@xxxxxxxxx>
---
fs/hfsplus/super.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/fs/hfsplus/super.c b/fs/hfsplus/super.c
index a9bca4b..4336d28 100644
--- a/fs/hfsplus/super.c
+++ b/fs/hfsplus/super.c
@@ -347,7 +347,7 @@ static int hfsplus_fill_super(struct super_block *sb, void *data, int silent)
u64 last_fs_block, last_fs_page;
int err;

- err = -EINVAL;
+ err = -ENOMEM;
sbi = kzalloc(sizeof(*sbi), GFP_KERNEL);
if (!sbi)
goto out;
--
1.7.9.5

--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/