[PATCH 3.16 072/366] video/fbdev/stifb: Return -ENOMEM after a failed kzalloc() in stifb_init_fb()
From: Ben Hutchings
Date: Sun Oct 14 2018 - 11:48:15 EST
3.16.60-rc1 review patch. If anyone has any objections, please let me know.
------------------
From: Markus Elfring <elfring@xxxxxxxxxxxxxxxxxxxxx>
commit f9815f945aff2204b8afbbb9d2182024eb44a194 upstream.
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@xxxxxxxxx>
Signed-off-by: Markus Elfring <elfring@xxxxxxxxxxxxxxxxxxxxx>
Cc: Helge Deller <deller@xxxxxx>
Cc: "James E. J. Bottomley" <jejb@xxxxxxxxxxxxxxxx>
Signed-off-by: Bartlomiej Zolnierkiewicz <b.zolnierkie@xxxxxxxxxxx>
Signed-off-by: Ben Hutchings <ben@xxxxxxxxxxxxxxx>
---
drivers/video/fbdev/stifb.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
--- a/drivers/video/fbdev/stifb.c
+++ b/drivers/video/fbdev/stifb.c
@@ -1091,7 +1091,7 @@ static int __init stifb_init_fb(struct s
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;