Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > linux.kernel > #1535354 > unrolled thread
| Started by | Pan Bian <bianpan2016@163.com> |
|---|---|
| First post | 2016-12-03 10:20 +0100 |
| Last post | 2016-12-10 00:20 +0100 |
| Articles | 2 — 2 participants |
Back to article view | Back to linux.kernel
[PATCH 1/1] dri: vc4: set error code on failure Pan Bian <bianpan2016@163.com> - 2016-12-03 10:20 +0100
Re: [PATCH 1/1] dri: vc4: set error code on failure Eric Anholt <eric@anholt.net> - 2016-12-10 00:20 +0100
| From | Pan Bian <bianpan2016@163.com> |
|---|---|
| Date | 2016-12-03 10:20 +0100 |
| Subject | [PATCH 1/1] dri: vc4: set error code on failure |
| Message-ID | <sKeE9-7HT-9@gated-at.bofh.it> |
Function vc4_cl_lookup_bos() does not set the error code when
drm_malloc_ab() returns a NULL pointer, and will return 0 (indicates
success). This patch fixes the bug, assigning "-ENOMEM" to the return
variable ret on the path that memory allocation fails.
Bugzilla: https://bugzilla.kernel.org/show_bug.cgi?id=188631
Signed-off-by: Pan Bian <bianpan2016@163.com>
---
drivers/gpu/drm/vc4/vc4_gem.c | 1 +
1 file changed, 1 insertion(+)
diff --git a/drivers/gpu/drm/vc4/vc4_gem.c b/drivers/gpu/drm/vc4/vc4_gem.c
index 47a095f..2592a94 100644
--- a/drivers/gpu/drm/vc4/vc4_gem.c
+++ b/drivers/gpu/drm/vc4/vc4_gem.c
@@ -544,6 +544,7 @@ struct vc4_hang_state {
handles = drm_malloc_ab(exec->bo_count, sizeof(uint32_t));
if (!handles) {
+ ret = -ENOMEM;
DRM_ERROR("Failed to allocate incoming GEM handles\n");
goto fail;
}
--
1.9.1
[toc] | [next] | [standalone]
| From | Eric Anholt <eric@anholt.net> |
|---|---|
| Date | 2016-12-10 00:20 +0100 |
| Message-ID | <sMCCl-XS-7@gated-at.bofh.it> |
| In reply to | #1535354 |
[Multipart message — attachments visible in raw view] — view raw
Pan Bian <bianpan2016@163.com> writes: > Function vc4_cl_lookup_bos() does not set the error code when > drm_malloc_ab() returns a NULL pointer, and will return 0 (indicates > success). This patch fixes the bug, assigning "-ENOMEM" to the return > variable ret on the path that memory allocation fails. > > Bugzilla: https://bugzilla.kernel.org/show_bug.cgi?id=188631 > Signed-off-by: Pan Bian <bianpan2016@163.com> This one was already fixed in b2cdeb19f16ad984eb5bb9193f793d05a8101511
[toc] | [prev] | [standalone]
Back to top | Article view | linux.kernel
csiph-web