From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1753038AbcHOQE1 (ORCPT ); Mon, 15 Aug 2016 12:04:27 -0400 Received: from mail-wm0-f67.google.com ([74.125.82.67]:36198 "EHLO mail-wm0-f67.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752821AbcHOQEZ (ORCPT ); Mon, 15 Aug 2016 12:04:25 -0400 Date: Mon, 15 Aug 2016 18:04:21 +0200 From: Daniel Vetter To: Wei Yongjun 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() Message-ID: <20160815160421.GL6232@phenom.ffwll.local> Mail-Followup-To: Wei Yongjun , airlied@redhat.com, airlied@linux.ie, architt@codeaurora.org, ville.syrjala@linux.intel.com, alexander.deucher@amd.com, dri-devel@lists.freedesktop.org, linux-kernel@vger.kernel.org References: <1471273431-6753-1-git-send-email-weiyj.lk@gmail.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <1471273431-6753-1-git-send-email-weiyj.lk@gmail.com> X-Operating-System: Linux phenom 4.6.0-1-amd64 User-Agent: Mutt/1.6.0 (2016-04-01) Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org 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 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