From patchwork Thu Jun 19 18:48:59 2014 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Wolfram Sang X-Patchwork-Id: 4386681 Return-Path: X-Original-To: patchwork-dri-devel@patchwork.kernel.org Delivered-To: patchwork-parsemail@patchwork2.web.kernel.org Received: from mail.kernel.org (mail.kernel.org [198.145.19.201]) by patchwork2.web.kernel.org (Postfix) with ESMTP id 97797BEEE9 for ; Fri, 20 Jun 2014 01:36:41 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id CA9C9203B0 for ; Fri, 20 Jun 2014 01:36:40 +0000 (UTC) Received: from gabe.freedesktop.org (gabe.freedesktop.org [131.252.210.177]) by mail.kernel.org (Postfix) with ESMTP id C5BCA203AE for ; Fri, 20 Jun 2014 01:36:39 +0000 (UTC) Received: from gabe.freedesktop.org (localhost [127.0.0.1]) by gabe.freedesktop.org (Postfix) with ESMTP id B9DD76E96A; Thu, 19 Jun 2014 18:36:32 -0700 (PDT) X-Original-To: dri-devel@lists.freedesktop.org Delivered-To: dri-devel@lists.freedesktop.org Received: from pokefinder.org (sauhun.de [89.238.76.85]) by gabe.freedesktop.org (Postfix) with ESMTP id C9CB46E91D for ; Thu, 19 Jun 2014 12:09:17 -0700 (PDT) Received: from p4fe25d7c.dip0.t-ipconnect.de ([79.226.93.124]:40282 helo=localhost) by pokefinder.org with esmtpsa (TLS1.2:RSA_AES_128_CBC_SHA1:128) (Exim 4.80) (envelope-from ) id 1WxhOn-0003cC-PN; Thu, 19 Jun 2014 20:49:25 +0200 From: Wolfram Sang To: linux-kernel@vger.kernel.org Subject: [PATCH 1/3] DRM: Armada: Use devm_ioremap_resource Date: Thu, 19 Jun 2014 20:48:59 +0200 Message-Id: <1403203741-5113-2-git-send-email-wsa@the-dreams.de> X-Mailer: git-send-email 2.0.0 In-Reply-To: <1403203741-5113-1-git-send-email-wsa@the-dreams.de> References: <1403203741-5113-1-git-send-email-wsa@the-dreams.de> X-Mailman-Approved-At: Thu, 19 Jun 2014 18:36:31 -0700 Cc: Russell King , Wolfram Sang , dri-devel@lists.freedesktop.org, Tushar Behera X-BeenThere: dri-devel@lists.freedesktop.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: Direct Rendering Infrastructure - Development List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , MIME-Version: 1.0 Errors-To: dri-devel-bounces@lists.freedesktop.org Sender: "dri-devel" X-Spam-Status: No, score=-4.2 required=5.0 tests=BAYES_00, RCVD_IN_DNSWL_MED, T_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 From: Tushar Behera While at it, propagate the error code. Signed-off-by: Tushar Behera Signed-off-by: Wolfram Sang --- 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 81c34f949dfc..3aedf9e993e6 100644 --- a/drivers/gpu/drm/armada/armada_crtc.c +++ b/drivers/gpu/drm/armada/armada_crtc.c @@ -1039,11 +1039,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) {