提交 f9815f94 编写于 作者: M Markus Elfring 提交者: Bartlomiej Zolnierkiewicz

video/fbdev/stifb: Return -ENOMEM after a failed kzalloc() in stifb_init_fb()

Replace an error code for the indication of a memory allocation failure
in this function.

Fixes: 1da177e4 ("Linux-2.6.12-rc2: Initial git repository build")
Suggested-by: NRolf Eike Beer <eike-kernel@sf-tec.de>
Signed-off-by: NMarkus Elfring <elfring@users.sourceforge.net>
Cc: Helge Deller <deller@gmx.de>
Cc: "James E. J. Bottomley" <jejb@parisc-linux.org>
Signed-off-by: NBartlomiej Zolnierkiewicz <b.zolnierkie@samsung.com>
上级 cfb810f8
...@@ -1128,7 +1128,7 @@ static int __init stifb_init_fb(struct sti_struct *sti, int bpp_pref) ...@@ -1128,7 +1128,7 @@ static int __init stifb_init_fb(struct sti_struct *sti, int bpp_pref)
fb = kzalloc(sizeof(*fb), GFP_ATOMIC); fb = kzalloc(sizeof(*fb), GFP_ATOMIC);
if (!fb) { if (!fb) {
printk(KERN_ERR "stifb: Could not allocate stifb structure\n"); printk(KERN_ERR "stifb: Could not allocate stifb structure\n");
return -ENODEV; return -ENOMEM;
} }
info = &fb->info; info = &fb->info;
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册