lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite for Android: free password hash cracker in your pocket
[<prev] [next>] [thread-next>] [day] [month] [year] [list]
Message-Id: <1471273431-6753-1-git-send-email-weiyj.lk@gmail.com>
Date:	Mon, 15 Aug 2016 15:03:51 +0000
From:	Wei Yongjun <weiyj.lk@...il.com>
To:	airlied@...hat.com, airlied@...ux.ie, daniel.vetter@...ll.ch,
	architt@...eaurora.org, ville.syrjala@...ux.intel.com,
	alexander.deucher@....com
Cc:	Wei Yongjun <weiyj.lk@...il.com>, dri-devel@...ts.freedesktop.org,
	linux-kernel@...r.kernel.org
Subject: [PATCH -next] drm/mgag200: fix error return code in mgag200fb_create()

Fix to return error code -ENOMEM from the vmalloc() error handling
case instead of 0, as done elsewhere in this function.

Fixes: aec9e12953e7 ("drm/mgag200: Fix error handling paths in fbdev driver")
Signed-off-by: Wei Yongjun <weiyj.lk@...il.com>
---
 drivers/gpu/drm/mgag200/mgag200_fb.c | 4 +++-
 1 file changed, 3 insertions(+), 1 deletion(-)

diff --git a/drivers/gpu/drm/mgag200/mgag200_fb.c b/drivers/gpu/drm/mgag200/mgag200_fb.c
index 81325f6..88dd221 100644
--- a/drivers/gpu/drm/mgag200/mgag200_fb.c
+++ b/drivers/gpu/drm/mgag200/mgag200_fb.c
@@ -183,8 +183,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)) {

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ