From patchwork Fri Jul 11 14:18:53 2014 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Ezequiel Garcia X-Patchwork-Id: 4535421 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 4C8A29F1C4 for ; Fri, 11 Jul 2014 15:35:56 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id 213DD20256 for ; Fri, 11 Jul 2014 15:35:54 +0000 (UTC) Received: from gabe.freedesktop.org (gabe.freedesktop.org [131.252.210.177]) by mail.kernel.org (Postfix) with ESMTP id 25C2D2025B for ; Fri, 11 Jul 2014 15:35:53 +0000 (UTC) Received: from gabe.freedesktop.org (localhost [127.0.0.1]) by gabe.freedesktop.org (Postfix) with ESMTP id 8CE0A6E27A; Fri, 11 Jul 2014 08:35:49 -0700 (PDT) X-Original-To: dri-devel@lists.freedesktop.org Delivered-To: dri-devel@lists.freedesktop.org Received: from mail-yh0-f43.google.com (mail-yh0-f43.google.com [209.85.213.43]) by gabe.freedesktop.org (Postfix) with ESMTP id 883DE6E846 for ; Fri, 11 Jul 2014 07:23:32 -0700 (PDT) Received: by mail-yh0-f43.google.com with SMTP id a41so430896yho.2 for ; Fri, 11 Jul 2014 07:23:32 -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=dtbDDoTHOdbw+maVuHBlCkJRyOX3eq5sAbp9QEagUr0=; b=Fn+1GpCCjzqwTfD79O3AAxzvQlky7rPcJKEp2p92ezPKK9pNEsaKRKswOEDdgswCMy TdduaigsegmMeX5W4Hg4+nuXeFjFLqiXOLK42iOjmp+cuzHDEJLs9gYbpUWS4/NitTmd EofWZnnXikyOwoTIgRoMxQDkPHzX777tPFussc2yq+0AgvU/DOGAonhLsnu2wFVufPz6 aK25WUBm4cKYMAr5+O9pIiCtb2bKdvZ19NAdgVx/4GaejgYiwesTnDNxm0iCK21DTd1c 8S7hW79s3hOHeNQswrxp/dLGn4WsNWQX/0xD3z9dFDyoHKs6RXR/8JwcqCVDZUPjf2mc F2kw== X-Gm-Message-State: ALoCoQkduqujOhQv+qk9dJSn9K7IphFBm1ujeP84Epdmy1SxB6DIrLJB3lWTvba5zFyrpmeDWDtP X-Received: by 10.236.206.115 with SMTP id k79mr8486396yho.1.1405088612204; Fri, 11 Jul 2014 07:23:32 -0700 (PDT) Received: from localhost.localdomain ([190.2.108.113]) by mx.google.com with ESMTPSA id f63sm5309293yhf.1.2014.07.11.07.23.29 for (version=TLSv1.2 cipher=ECDHE-RSA-AES128-SHA bits=128/128); Fri, 11 Jul 2014 07:23:31 -0700 (PDT) From: Ezequiel Garcia To: , , Dave Airlie Subject: [PATCH 7/8] drm/tilcdc: panel: Set return value explicitly Date: Fri, 11 Jul 2014 11:18:53 -0300 Message-Id: <1405088334-11215-8-git-send-email-ezequiel@vanguardiasur.com.ar> X-Mailer: git-send-email 1.9.1 In-Reply-To: <1405088334-11215-1-git-send-email-ezequiel@vanguardiasur.com.ar> References: <1405088334-11215-1-git-send-email-ezequiel@vanguardiasur.com.ar> X-Mailman-Approved-At: Fri, 11 Jul 2014 08:35:47 -0700 Cc: daniel.vetter@ffwll.ch, Russell King , Ezequiel Garcia 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.8 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 Instead of setting an initial value for the return code, set it explicitly on each error path. This is just a cosmetic cleanup, as preparation for the enable GPIO support. Signed-off-by: Ezequiel Garcia --- drivers/gpu/drm/tilcdc/tilcdc_panel.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/drivers/gpu/drm/tilcdc/tilcdc_panel.c b/drivers/gpu/drm/tilcdc/tilcdc_panel.c index 3dcf08e..f2a5b23 100644 --- a/drivers/gpu/drm/tilcdc/tilcdc_panel.c +++ b/drivers/gpu/drm/tilcdc/tilcdc_panel.c @@ -346,7 +346,7 @@ static int panel_probe(struct platform_device *pdev) struct panel_module *panel_mod; struct tilcdc_module *mod; struct pinctrl *pinctrl; - int ret = -EINVAL; + int ret; /* bail out early if no DT data: */ if (!node) { @@ -381,12 +381,14 @@ static int panel_probe(struct platform_device *pdev) panel_mod->timings = of_get_display_timings(node); if (!panel_mod->timings) { dev_err(&pdev->dev, "could not get panel timings\n"); + ret = -EINVAL; goto fail_free; } panel_mod->info = of_get_panel_info(node); if (!panel_mod->info) { dev_err(&pdev->dev, "could not get panel info\n"); + ret = -EINVAL; goto fail_timings; }