Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > linux.kernel > #1462859 > unrolled thread
| Started by | Wei Yongjun <weiyj.lk@gmail.com> |
|---|---|
| First post | 2016-08-15 17:10 +0200 |
| Last post | 2016-08-15 18:10 +0200 |
| Articles | 2 — 2 participants |
Back to article view | Back to linux.kernel
[PATCH -next] drm/mgag200: fix error return code in mgag200fb_create() Wei Yongjun <weiyj.lk@gmail.com> - 2016-08-15 17:10 +0200
Re: [PATCH -next] drm/mgag200: fix error return code in mgag200fb_create() Daniel Vetter <daniel@ffwll.ch> - 2016-08-15 18:10 +0200
| From | Wei Yongjun <weiyj.lk@gmail.com> |
|---|---|
| Date | 2016-08-15 17:10 +0200 |
| Subject | [PATCH -next] drm/mgag200: fix error return code in mgag200fb_create() |
| Message-ID | <s6rGx-7aD-5@gated-at.bofh.it> |
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@gmail.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)) {
[toc] | [next] | [standalone]
| From | Daniel Vetter <daniel@ffwll.ch> |
|---|---|
| Date | 2016-08-15 18:10 +0200 |
| Subject | Re: [PATCH -next] drm/mgag200: fix error return code in mgag200fb_create() |
| Message-ID | <s6sCB-7KV-1@gated-at.bofh.it> |
| In reply to | #1462859 |
On Mon, Aug 15, 2016 at 03:03:51PM +0000, Wei Yongjun wrote:
> 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@gmail.com>
Applied to drm-misc, thanks.
-Daniel
> ---
> 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)) {
>
--
Daniel Vetter
Software Engineer, Intel Corporation
http://blog.ffwll.ch
[toc] | [prev] | [standalone]
Back to top | Article view | linux.kernel
csiph-web