Commit 37102bd0 authored by Yury Umanets's avatar Yury Umanets Committed by Linus Torvalds

[PATCH] memory allocation checks in mtdblock_open()

Fixes memory allocation check in mtdblock_open()
Signed-off-by: default avatarYury Umanets <torque@ukrpost.net>
Signed-off-by: default avatarAndrew Morton <akpm@osdl.org>
Signed-off-by: default avatarLinus Torvalds <torvalds@osdl.org>
parent a5fe5659
......@@ -275,7 +275,7 @@ static int mtdblock_open(struct mtd_blktrans_dev *mbd)
/* OK, it's not open. Create cache info for it */
mtdblk = kmalloc(sizeof(struct mtdblk_dev), GFP_KERNEL);
if (!mtdblks)
if (!mtdblk)
return -ENOMEM;
memset(mtdblk, 0, sizeof(*mtdblk));
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment