From patchwork Sat Mar 15 21:12:16 2014 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Arthur Borsboom X-Patchwork-Id: 3838361 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 A1C529F1CD for ; Sat, 15 Mar 2014 21:12:56 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id B366420373 for ; Sat, 15 Mar 2014 21:12:55 +0000 (UTC) Received: from gabe.freedesktop.org (gabe.freedesktop.org [131.252.210.177]) by mail.kernel.org (Postfix) with ESMTP id C1DF02034E for ; Sat, 15 Mar 2014 21:12:50 +0000 (UTC) Received: from gabe.freedesktop.org (localhost [127.0.0.1]) by gabe.freedesktop.org (Postfix) with ESMTP id 60638892B4; Sat, 15 Mar 2014 14:12:48 -0700 (PDT) X-Original-To: dri-devel@lists.freedesktop.org Delivered-To: dri-devel@lists.freedesktop.org Received: from mail-we0-f178.google.com (mail-we0-f178.google.com [74.125.82.178]) by gabe.freedesktop.org (Postfix) with ESMTP id 772CD892B4 for ; Sat, 15 Mar 2014 14:12:47 -0700 (PDT) Received: by mail-we0-f178.google.com with SMTP id u56so3270540wes.37 for ; Sat, 15 Mar 2014 14:12:46 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=from:to:cc:subject:date:message-id; bh=2CoLS7TsH3m0tQNfT8wJ8w5A/54zv+p0uBTq4HPYaoc=; b=qZIYZYq8k2fcohUfN6Qaq3ZwYVs0alsnS9Q7nVh8sofYkLdVSdGSXFUIKzDMQJmCYQ prp7dJkmbuCFbko17WRDXYTzi0goj+03TCF0tVlpBfKgZvhELve/Zp96C6rjXqpDdFy+ 9lPYXiGuqoCswYfXI0u1cJQnNKAgf2w9SaMGIzROXIf2xvv7sz5hZ7tEMvCiSLNrPrqs HiBYmB2uJULNdxJgomz9aGQe7N9TKqA+kckk3Zxmg6tAOBnnVxHjO5KReOsiiSJdDEo4 IWSimRjouUq/NuIsJk93ylFe1ARvZoGffpXjgxIu+t968LSaydUV9J4N1RPGYeU6h6MV n7OA== X-Received: by 10.180.205.130 with SMTP id lg2mr3387339wic.59.1394917966263; Sat, 15 Mar 2014 14:12:46 -0700 (PDT) Received: from localhost.localdomain ([78.251.234.62]) by mx.google.com with ESMTPSA id r1sm9071679wia.5.2014.03.15.14.12.45 for (version=TLSv1.2 cipher=ECDHE-RSA-AES128-SHA bits=128/128); Sat, 15 Mar 2014 14:12:45 -0700 (PDT) From: Arthur Borsboom To: dri-devel@lists.freedesktop.org Subject: [PATCH 1/3] drm/gma500: Code cleanup - removal of centralized exiting of function Date: Sat, 15 Mar 2014 22:12:16 +0100 Message-Id: <1394917938-1746-1-git-send-email-arthurborsboom@gmail.com> X-Mailer: git-send-email 1.9.0 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.1 required=5.0 tests=BAYES_00, DKIM_ADSP_CUSTOM_MED, DKIM_SIGNED, FREEMAIL_FROM, RCVD_IN_DNSWL_MED, T_DKIM_INVALID, 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 Removed centralized exiting of function (goto statement), since it was the only used in one single location with only a return statement. Signed-off-by: Arthur Borsboom --- drivers/gpu/drm/gma500/psb_drv.c | 7 +------ 1 file changed, 1 insertion(+), 6 deletions(-) diff --git a/drivers/gpu/drm/gma500/psb_drv.c b/drivers/gpu/drm/gma500/psb_drv.c index 1199180..a10db3d 100644 --- a/drivers/gpu/drm/gma500/psb_drv.c +++ b/drivers/gpu/drm/gma500/psb_drv.c @@ -169,12 +169,9 @@ static int psb_do_init(struct drm_device *dev) uint32_t stolen_gtt; - int ret = -ENOMEM; - if (pg->mmu_gatt_start & 0x0FFFFFFF) { dev_err(dev->dev, "Gatt must be 256M aligned. This is a bug.\n"); - ret = -EINVAL; - goto out_err; + return -EINVAL; } @@ -199,8 +196,6 @@ static int psb_do_init(struct drm_device *dev) /* mmu_gatt ?? */ PSB_WSGX32(pg->gatt_start, PSB_CR_BIF_TWOD_REQ_BASE); return 0; -out_err: - return ret; } static int psb_driver_unload(struct drm_device *dev)