From patchwork Wed Sep 11 11:16:53 2013 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Wei Yongjun X-Patchwork-Id: 2877431 Return-Path: X-Original-To: patchwork-dri-devel@patchwork.kernel.org Delivered-To: patchwork-parsemail@patchwork1.web.kernel.org Received: from mail.kernel.org (mail.kernel.org [198.145.19.201]) by patchwork1.web.kernel.org (Postfix) with ESMTP id A9A779F476 for ; Thu, 12 Sep 2013 10:07:16 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id E78B7202EA for ; Thu, 12 Sep 2013 10:07:11 +0000 (UTC) Received: from gabe.freedesktop.org (gabe.freedesktop.org [131.252.210.177]) by mail.kernel.org (Postfix) with ESMTP id 2C2F5202EC for ; Thu, 12 Sep 2013 10:07:08 +0000 (UTC) Received: from gabe.freedesktop.org (localhost [127.0.0.1]) by gabe.freedesktop.org (Postfix) with ESMTP id 63A09E61B7 for ; Thu, 12 Sep 2013 03:07:07 -0700 (PDT) X-Original-To: dri-devel@lists.freedesktop.org Delivered-To: dri-devel@lists.freedesktop.org Received: from mail-bk0-f54.google.com (mail-bk0-f54.google.com [209.85.214.54]) by gabe.freedesktop.org (Postfix) with ESMTP id 3CEF2E5C87 for ; Wed, 11 Sep 2013 04:16:55 -0700 (PDT) Received: by mail-bk0-f54.google.com with SMTP id mz12so3565341bkb.13 for ; Wed, 11 Sep 2013 04:16:53 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:date:message-id:subject:from:to:cc:content-type; bh=iKZUpvLIdwpA8s81Z5H9leWVxp6IZlm7kSA5uTSvqp4=; b=ua757iIzMdA+PrWKyCKUPMqW9vUv5jzhyR/ojcu4WCAr6mI32uQgd/6hYAh1GYOXxp 04kc+S1qT6cwX7ePC8Hcddd49sVvb6i87hv0m7K5wYZxpVG2FL1h2clTxW0NLQopEII2 S2j7OezBhT1kXSm9Uj2hF5b0D9wAPsJapK+kdHCPy7InW1fOgeSMyD8jkhoV2ccBzPr3 sAUNZBd3G0FOroauVDlupe4jZpyuynF2kPf7L3gCGFdWuxUpp3lP0ANZWA8r7u3Mh51r MKQGtN8E5ed9XTgxFJBqy3rgpOackYGuwGn1K5EzsOSJF4yKHH8GZVz3v/5bVbRnwFK0 /n4A== MIME-Version: 1.0 X-Received: by 10.204.71.133 with SMTP id h5mr964878bkj.0.1378898213835; Wed, 11 Sep 2013 04:16:53 -0700 (PDT) Received: by 10.205.13.74 with HTTP; Wed, 11 Sep 2013 04:16:53 -0700 (PDT) Date: Wed, 11 Sep 2013 19:16:53 +0800 Message-ID: Subject: [PATCH] drm/omap: fix error return code in omap_dmm_probe() From: Wei Yongjun To: airlied@linux.ie, gregkh@linuxfoundation.org, andy.gross@ti.com, robdclark@gmail.com, joe@perches.com X-Mailman-Approved-At: Thu, 12 Sep 2013 02:59:26 -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 X-Spam-Status: No, score=-5.0 required=5.0 tests=BAYES_00, DKIM_ADSP_CUSTOM_MED, DKIM_SIGNED, FREEMAIL_FROM, RCVD_IN_DNSWL_MED, RP_MATCHES_RCVD, T_DKIM_INVALID, UNPARSEABLE_RELAY autolearn=unavailable version=3.3.1 X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on mail.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP From: Wei Yongjun Fix to return -ENOMEM in the refill memory alloc error handling case instead of 0, as done elsewhere in this function. Signed-off-by: Wei Yongjun --- drivers/gpu/drm/omapdrm/omap_dmm_tiler.c | 1 + 1 file changed, 1 insertion(+) diff --git a/drivers/gpu/drm/omapdrm/omap_dmm_tiler.c b/drivers/gpu/drm/omapdrm/omap_dmm_tiler.c index 9b794c9..ab546c9 100644 --- a/drivers/gpu/drm/omapdrm/omap_dmm_tiler.c +++ b/drivers/gpu/drm/omapdrm/omap_dmm_tiler.c @@ -675,6 +675,7 @@ static int omap_dmm_probe(struct platform_device *dev) &omap_dmm->refill_pa, GFP_KERNEL); if (!omap_dmm->refill_va) { dev_err(&dev->dev, "could not allocate refill memory\n"); + ret = -ENOMEM; goto fail; }