From: Daniel Vetter <daniel@ffwll.ch>
To: Wei Yongjun <weiyj.lk@gmail.com>
Cc: airlied@redhat.com, airlied@linux.ie, daniel.vetter@ffwll.ch,
architt@codeaurora.org, ville.syrjala@linux.intel.com,
alexander.deucher@amd.com, dri-devel@lists.freedesktop.org,
linux-kernel@vger.kernel.org
Subject: Re: [PATCH -next] drm/mgag200: fix error return code in mgag200fb_create()
Date: Mon, 15 Aug 2016 18:04:21 +0200 [thread overview]
Message-ID: <20160815160421.GL6232@phenom.ffwll.local> (raw)
In-Reply-To: <1471273431-6753-1-git-send-email-weiyj.lk@gmail.com>
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
prev parent reply other threads:[~2016-08-15 16:04 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2016-08-15 15:03 Wei Yongjun
2016-08-15 16:04 ` Daniel Vetter [this message]
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20160815160421.GL6232@phenom.ffwll.local \
--to=daniel@ffwll.ch \
--cc=airlied@linux.ie \
--cc=airlied@redhat.com \
--cc=alexander.deucher@amd.com \
--cc=architt@codeaurora.org \
--cc=daniel.vetter@ffwll.ch \
--cc=dri-devel@lists.freedesktop.org \
--cc=linux-kernel@vger.kernel.org \
--cc=ville.syrjala@linux.intel.com \
--cc=weiyj.lk@gmail.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox
Powered by JetHome