From patchwork Tue May 7 13:43:33 2013 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Wei Yongjun X-Patchwork-Id: 2537591 Return-Path: X-Original-To: patchwork-dri-devel@patchwork.kernel.org Delivered-To: patchwork-process-083081@patchwork1.kernel.org Received: from gabe.freedesktop.org (gabe.freedesktop.org [131.252.210.177]) by patchwork1.kernel.org (Postfix) with ESMTP id E56B73FE1F for ; Wed, 8 May 2013 05:35:11 +0000 (UTC) Received: from gabe.freedesktop.org (localhost [127.0.0.1]) by gabe.freedesktop.org (Postfix) with ESMTP id BD4B9E6153 for ; Tue, 7 May 2013 22:35:11 -0700 (PDT) X-Original-To: dri-devel@lists.freedesktop.org Delivered-To: dri-devel@lists.freedesktop.org Received: from mail-bk0-f42.google.com (mail-bk0-f42.google.com [209.85.214.42]) by gabe.freedesktop.org (Postfix) with ESMTP id BFC92E61D3 for ; Tue, 7 May 2013 06:43:34 -0700 (PDT) Received: by mail-bk0-f42.google.com with SMTP id j4so303601bkw.29 for ; Tue, 07 May 2013 06:43:33 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:x-received:date:message-id:subject:from:to:cc :content-type; bh=8UBX1FDRXYKau7XEHghkAYkRHT26jrY7+NnwAAp3sRk=; b=j2O95XtwR2yDxHneVRYjGOyXxSjhaaYotvndVVBjymmSsMyGOOxDnaWJzdolTUaRuv 5diaknar39aiyLsmFPyZwD2AYww6XSAxEdMmjyFi5J0PfKnMb0tQoJvb93kCf1izIWYu TiylzklrxFhwto2/+oBjgL0J0PkkAqgK8ZciIRZVPPICFGASbDRbD/RKXMUrbtGWTdUD hnvLxFoikZoP79k1uiZSup3jUau0T9frSfA61+nUcdVROXNIeTCWAcTxU+A2e77JHl0a L5zZB6/CERR0gmL03QQXCzE1Nah77cowhzspTBoOpg+bCccvAgphy2kzW0MpTNcX6GbI xpjA== MIME-Version: 1.0 X-Received: by 10.205.38.3 with SMTP id tg3mr604327bkb.66.1367934213641; Tue, 07 May 2013 06:43:33 -0700 (PDT) Received: by 10.204.199.129 with HTTP; Tue, 7 May 2013 06:43:33 -0700 (PDT) Date: Tue, 7 May 2013 21:43:33 +0800 Message-ID: Subject: [PATCH] drm/exynos: fix error return code in exynos_drm_load() From: Wei Yongjun To: inki.dae@samsung.com, jy0922.shim@samsung.com, sw0312.kim@samsung.com, kyungmin.park@samsung.com, airlied@linux.ie X-Mailman-Approved-At: Tue, 07 May 2013 22:34:04 -0700 Cc: yongjun_wei@trendmicro.com.cn, linux-kernel@vger.kernel.org, dri-devel@lists.freedesktop.org X-BeenThere: dri-devel@lists.freedesktop.org X-Mailman-Version: 2.1.13 Precedence: list List-Id: Direct Rendering Infrastructure - Development List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: dri-devel-bounces+patchwork-dri-devel=patchwork.kernel.org@lists.freedesktop.org Errors-To: dri-devel-bounces+patchwork-dri-devel=patchwork.kernel.org@lists.freedesktop.org From: Wei Yongjun Fix to return -ENOMEM in the exynos_plane_init() error handling case instead of 0, as done elsewhere in this function. Signed-off-by: Wei Yongjun --- drivers/gpu/drm/exynos/exynos_drm_drv.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/drivers/gpu/drm/exynos/exynos_drm_drv.c b/drivers/gpu/drm/exynos/exynos_drm_drv.c index ba6d995..3a10373 100644 --- a/drivers/gpu/drm/exynos/exynos_drm_drv.c +++ b/drivers/gpu/drm/exynos/exynos_drm_drv.c @@ -91,8 +91,10 @@ static int exynos_drm_load(struct drm_device *dev, unsigned long flags) unsigned int possible_crtcs = (1 << MAX_CRTC) - 1; plane = exynos_plane_init(dev, possible_crtcs, false); - if (!plane) + if (!plane) { + ret = -ENOMEM; goto err_release_iommu_mapping; + } } ret = drm_vblank_init(dev, MAX_CRTC);