* [PATCH -next] drm/mgag200: fix error return code in mgag200fb_create()
@ 2016-08-15 15:03 Wei Yongjun
2016-08-15 16:04 ` Daniel Vetter
0 siblings, 1 reply; 3+ messages in thread
From: Wei Yongjun @ 2016-08-15 15:03 UTC (permalink / raw)
To: airlied, airlied, daniel.vetter, architt, ville.syrjala,
alexander.deucher
Cc: Wei Yongjun, dri-devel, linux-kernel
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)) {
^ permalink raw reply related [flat|nested] 3+ messages in thread
* Re: [PATCH -next] drm/mgag200: fix error return code in mgag200fb_create()
2016-08-15 15:03 [PATCH -next] drm/mgag200: fix error return code in mgag200fb_create() Wei Yongjun
@ 2016-08-15 16:04 ` Daniel Vetter
0 siblings, 0 replies; 3+ messages in thread
From: Daniel Vetter @ 2016-08-15 16:04 UTC (permalink / raw)
To: Wei Yongjun
Cc: airlied, airlied, daniel.vetter, architt, ville.syrjala,
alexander.deucher, dri-devel, linux-kernel
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
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: [PATCH -next] drm/mgag200: fix error return code in mgag200fb_create()
@ 2016-08-15 16:04 ` Daniel Vetter
0 siblings, 0 replies; 3+ messages in thread
From: Daniel Vetter @ 2016-08-15 16:04 UTC (permalink / raw)
To: Wei Yongjun
Cc: daniel.vetter, linux-kernel, dri-devel, alexander.deucher, airlied
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
_______________________________________________
dri-devel mailing list
dri-devel@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/dri-devel
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2016-08-15 16:04 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2016-08-15 15:03 [PATCH -next] drm/mgag200: fix error return code in mgag200fb_create() Wei Yongjun
2016-08-15 16:04 ` Daniel Vetter
2016-08-15 16:04 ` Daniel Vetter
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.