* [patch] drm/mgag200: set an error code
@ 2015-09-28 10:02 Dan Carpenter
0 siblings, 0 replies; only message in thread
From: Dan Carpenter @ 2015-09-28 10:02 UTC (permalink / raw)
To: David Airlie, Archit Taneja
Cc: Daniel Vetter, Christian König, Patrik Jakobsson,
Alex Deucher, Sudip Mukherjee, Thierry Reding, dri-devel,
kernel-janitors
We need to set "ret" if vmalloc() fails.
Fixes: aec9e12953e7 ('drm/mgag200: Fix error handling paths in fbdev driver')
Signed-off-by: Dan Carpenter <dan.carpenter@oracle.com>
diff --git a/drivers/gpu/drm/mgag200/mgag200_fb.c b/drivers/gpu/drm/mgag200/mgag200_fb.c
index b35b5b2..2a1049e 100644
--- a/drivers/gpu/drm/mgag200/mgag200_fb.c
+++ b/drivers/gpu/drm/mgag200/mgag200_fb.c
@@ -185,8 +185,10 @@ static int mgag200fb_create(struct drm_fb_helper *helper,
}
sysram = vmalloc(size);
- if (!sysram)
+ if (!sysram) {
+ ret = -ENOMEM;
goto err_sysram;
+ }
info = drm_fb_helper_alloc_fbi(helper);
if (IS_ERR(info)) {
^ permalink raw reply related [flat|nested] only message in thread
only message in thread, other threads:[~2015-09-28 10:02 UTC | newest]
Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2015-09-28 10:02 [patch] drm/mgag200: set an error code Dan Carpenter
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).