From patchwork Thu Oct 31 11:08:04 2013 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Tushar Behera X-Patchwork-Id: 3136581 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 B4C0C9F432 for ; Mon, 4 Nov 2013 16:51:16 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id 0A7B020501 for ; Mon, 4 Nov 2013 16:51:12 +0000 (UTC) Received: from gabe.freedesktop.org (gabe.freedesktop.org [131.252.210.177]) by mail.kernel.org (Postfix) with ESMTP id 978F62022D for ; Mon, 4 Nov 2013 16:51:10 +0000 (UTC) Received: from gabe.freedesktop.org (localhost [127.0.0.1]) by gabe.freedesktop.org (Postfix) with ESMTP id AAE77FAA74; Mon, 4 Nov 2013 08:50:16 -0800 (PST) X-Original-To: dri-devel@lists.freedesktop.org Delivered-To: dri-devel@lists.freedesktop.org Received: from mail-pa0-f48.google.com (mail-pa0-f48.google.com [209.85.220.48]) by gabe.freedesktop.org (Postfix) with ESMTP id E2FA8EFB16 for ; Thu, 31 Oct 2013 04:09:38 -0700 (PDT) Received: by mail-pa0-f48.google.com with SMTP id kq14so2324863pab.7 for ; Thu, 31 Oct 2013 04:09:38 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references; bh=V3ZqtTtR9u0LDKYh+wNgoazQqCcKCwxJffvXBKL6TlU=; b=A52f4qjhRDOsAT7iViWap9uRv7e2SoX45QHQDbHsQoKynN+oCkVt8xwWoQkYtfnRZU AcmFA/K9miUiSDruOIpp1KkgLC2mYiDuGuvQFtzJmrb3n3/D5Rc4+W/1Fka+J/m7m6vW 9VcDPtwCbSgobTwmkl0bwwbpvUpN1nj/ITO7+A+0kyyykdgfxS5tmKVgxqZZ+19gAXCY RjfTdOPU97fIR3fZ/u3c2ETLudGp6uCCMFtcheN2emUI51zIY9lh264LPuNSmVO28cGJ 27orW97HS749mRCV+UFFopWzctv1Br+yuEStXptkJbzCUV+In4nEa0wXQQK4DllOwaMN cbxg== X-Gm-Message-State: ALoCoQlnL6Yb3vQI0ImgjHAxSRnPY9HC6cSTQqX9tumaJ2A4f5yRz5/2ceiL8/ZUsAIyU69yYlW5 X-Received: by 10.68.203.164 with SMTP id kr4mr1346667pbc.48.1383217778858; Thu, 31 Oct 2013 04:09:38 -0700 (PDT) Received: from linaro.sisodomain.com ([115.113.119.130]) by mx.google.com with ESMTPSA id hz10sm3446333pbc.36.2013.10.31.04.09.36 for (version=TLSv1.1 cipher=ECDHE-RSA-RC4-SHA bits=128/128); Thu, 31 Oct 2013 04:09:38 -0700 (PDT) From: Tushar Behera To: linux-kernel@vger.kernel.org Subject: [PATCH 2/5] DRM: Armada: Use devm_ioremap_resource Date: Thu, 31 Oct 2013 16:38:04 +0530 Message-Id: <1383217687-12037-3-git-send-email-tushar.behera@linaro.org> X-Mailer: git-send-email 1.7.9.5 In-Reply-To: <1383217687-12037-1-git-send-email-tushar.behera@linaro.org> References: <1383217687-12037-1-git-send-email-tushar.behera@linaro.org> X-Mailman-Approved-At: Mon, 04 Nov 2013 08:48:40 -0800 Cc: Russell King , dri-devel@lists.freedesktop.org, patches@linaro.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: , MIME-Version: 1.0 Sender: dri-devel-bounces@lists.freedesktop.org Errors-To: dri-devel-bounces@lists.freedesktop.org X-Spam-Status: No, score=-4.2 required=5.0 tests=BAYES_00, RCVD_IN_DNSWL_MED, RP_MATCHES_RCVD, 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 While at it, propagate the error code. Signed-off-by: Tushar Behera CC: dri-devel@lists.freedesktop.org CC: Russell King CC: David Airlie --- drivers/gpu/drm/armada/armada_crtc.c | 8 +++----- 1 file changed, 3 insertions(+), 5 deletions(-) diff --git a/drivers/gpu/drm/armada/armada_crtc.c b/drivers/gpu/drm/armada/armada_crtc.c index d8e3982..2b6e7b7 100644 --- a/drivers/gpu/drm/armada/armada_crtc.c +++ b/drivers/gpu/drm/armada/armada_crtc.c @@ -1037,11 +1037,9 @@ int armada_drm_crtc_create(struct drm_device *dev, unsigned num, if (ret) return ret; - base = devm_request_and_ioremap(dev->dev, res); - if (!base) { - DRM_ERROR("failed to ioremap register\n"); - return -ENOMEM; - } + base = devm_ioremap_resource(dev->dev, res); + if (IS_ERR(base)) + return PTR_ERR(base); dcrtc = kzalloc(sizeof(*dcrtc), GFP_KERNEL); if (!dcrtc) {