summaryrefslogtreecommitdiff
path: root/drivers/video/fbdev/stifb.c
diff options
context:
space:
mode:
authorMarkus Elfring <elfring@users.sourceforge.net>2018-03-28 16:34:27 +0200
committerBartlomiej Zolnierkiewicz <b.zolnierkie@samsung.com>2018-03-28 16:34:27 +0200
commitf9815f945aff2204b8afbbb9d2182024eb44a194 (patch)
tree9d322debfc56e1f132ad7560ae7129cd43cf75b4 /drivers/video/fbdev/stifb.c
parentcfb810f85992071ef715188163afb34c1701dc85 (diff)
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: 1da177e4c3f4 ("Linux-2.6.12-rc2: Initial git repository build") Suggested-by: Rolf Eike Beer <eike-kernel@sf-tec.de> Signed-off-by: Markus Elfring <elfring@users.sourceforge.net> Cc: Helge Deller <deller@gmx.de> Cc: "James E. J. Bottomley" <jejb@parisc-linux.org> Signed-off-by: Bartlomiej Zolnierkiewicz <b.zolnierkie@samsung.com>
Diffstat (limited to 'drivers/video/fbdev/stifb.c')
-rw-r--r--drivers/video/fbdev/stifb.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/video/fbdev/stifb.c b/drivers/video/fbdev/stifb.c
index 6ded5c198998..511a594889af 100644
--- a/drivers/video/fbdev/stifb.c
+++ b/drivers/video/fbdev/stifb.c
@@ -1128,7 +1128,7 @@ static int __init stifb_init_fb(struct sti_struct *sti, int bpp_pref)
fb = kzalloc(sizeof(*fb), GFP_ATOMIC);
if (!fb) {
printk(KERN_ERR "stifb: Could not allocate stifb structure\n");
- return -ENODEV;
+ return -ENOMEM;
}
info = &fb->info;