From patchwork Tue Sep 2 12:51:21 2014 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Ezequiel Garcia X-Patchwork-Id: 4825071 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 AECF89F2ED for ; Tue, 2 Sep 2014 12:54:35 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id 9198420170 for ; Tue, 2 Sep 2014 12:54:34 +0000 (UTC) Received: from gabe.freedesktop.org (gabe.freedesktop.org [131.252.210.177]) by mail.kernel.org (Postfix) with ESMTP id 126EA201BB for ; Tue, 2 Sep 2014 12:54:29 +0000 (UTC) Received: from gabe.freedesktop.org (localhost [127.0.0.1]) by gabe.freedesktop.org (Postfix) with ESMTP id 55CF76E474; Tue, 2 Sep 2014 05:54:28 -0700 (PDT) X-Original-To: dri-devel@lists.freedesktop.org Delivered-To: dri-devel@lists.freedesktop.org Received: from mail-vc0-f178.google.com (mail-vc0-f178.google.com [209.85.220.178]) by gabe.freedesktop.org (Postfix) with ESMTP id 0F7066E477 for ; Tue, 2 Sep 2014 05:54:26 -0700 (PDT) Received: by mail-vc0-f178.google.com with SMTP id la4so6784414vcb.23 for ; Tue, 02 Sep 2014 05:54:26 -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=3vc+hjMTro12EMlPTg7xEygNkUbs4HOnfqNODmdJWmw=; b=HkgmF2HaJpjQdkmPMclexR5KPz9klQuL1OT3I9Zi9+X0A7cWcgSPNP1pHHdqm2XLJs SAo/r40odYu/a/ILxWH+PLbMP6JoEsW7KQ+OFvRpUPrzrpqZAekym2kr0bzVjdvUq/3M J0BjMZOKpcwziwFRRSvL7I/8HsNo97b+qLd254AGnfzkv6KkjUrHRgISfCPT+d/EPupN yE5U/UuJgvKr+ZnY5bXVS16ClFmvcAq9R0Aumdv/K0HCrEbdnPyy+ZIln5sdFedvZS3g AHGYNA/Btb2XfJoVNN9EcWKmibZbOfS8s4Tk76F79XhOctyybO0xc01WzBKd3a/hjPXZ C5qg== X-Gm-Message-State: ALoCoQmXvoD4ZxzJx2+DqZBoS+0HS9UdGMelHpfAKP9nfxNt+QxH7FBvqk3yu+ptF5aHTr3VVUMM X-Received: by 10.52.147.15 with SMTP id tg15mr101611vdb.53.1409662466673; Tue, 02 Sep 2014 05:54:26 -0700 (PDT) Received: from arch.hh.imgtec.org ([190.2.108.102]) by mx.google.com with ESMTPSA id vm20sm9912017vdb.21.2014.09.02.05.54.24 for (version=TLSv1.2 cipher=ECDHE-RSA-AES128-SHA bits=128/128); Tue, 02 Sep 2014 05:54:26 -0700 (PDT) From: Ezequiel Garcia To: , Dave Airlie Subject: [PATCH/RESEND 7/8] drm/tilcdc: panel: Set return value explicitly Date: Tue, 2 Sep 2014 09:51:21 -0300 Message-Id: <1409662282-7945-8-git-send-email-ezequiel@vanguardiasur.com.ar> X-Mailer: git-send-email 2.0.1 In-Reply-To: <1409662282-7945-1-git-send-email-ezequiel@vanguardiasur.com.ar> References: <1409662282-7945-1-git-send-email-ezequiel@vanguardiasur.com.ar> 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=-5.9 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. Tested-by: Darren Etheridge 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; }