From patchwork Tue Sep 2 12:51:16 2014 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Ezequiel Garcia X-Patchwork-Id: 4825021 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 B8ECE9F2ED for ; Tue, 2 Sep 2014 12:54:20 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id B4387201BC for ; Tue, 2 Sep 2014 12:54:19 +0000 (UTC) Received: from gabe.freedesktop.org (gabe.freedesktop.org [131.252.210.177]) by mail.kernel.org (Postfix) with ESMTP id 95A1E201BB for ; Tue, 2 Sep 2014 12:54:18 +0000 (UTC) Received: from gabe.freedesktop.org (localhost [127.0.0.1]) by gabe.freedesktop.org (Postfix) with ESMTP id CA5966E46B; Tue, 2 Sep 2014 05:54:17 -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 D936A6E46B for ; Tue, 2 Sep 2014 05:54:16 -0700 (PDT) Received: by mail-vc0-f178.google.com with SMTP id la4so6784080vcb.23 for ; Tue, 02 Sep 2014 05:54:15 -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=Kis3IvfxjWOfbcc/XkCC0Mp7Oed49H8De+w6okWvgi8=; b=CfzMofLTmRVY8IfhQwm9uxH4L2Q1IKprBiADUP2GbgxKceD0pOWhERaKFPFyNQ2X3B rU08bDRVa+M16uo4POaDn5hVDEYJA1R+lp//mQ8bHGQnT4JUrU0gnXYUYUWTtlezMQbY KpVlz8/HeDtHTP06f0Xu9RfaK+W3O6a5sUxwqjPTaax1DunTEpIH3hvLeCMqijQe5U7L meEP6GhW36aIhI/J8X5QwTCaDt/jBax8XocXdMY02g9AroD2sDfAod3VljlJW/B+2Za1 f2BDpoXhueg+yFX3Hrku+TKkLqASykkGNvXA+r63V8vHETE1i8CmjeRjHNHvXASj8DU3 wHxQ== X-Gm-Message-State: ALoCoQkgnFSOD+UfdnBmFut8huukTMazr8q1MGmCtxoQ2+pDoJXO4fv4oBZY55XVX9D+KSAB64Ab X-Received: by 10.221.6.201 with SMTP id ol9mr29933422vcb.2.1409662455227; Tue, 02 Sep 2014 05:54:15 -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.13 for (version=TLSv1.2 cipher=ECDHE-RSA-AES128-SHA bits=128/128); Tue, 02 Sep 2014 05:54:14 -0700 (PDT) From: Ezequiel Garcia To: , Dave Airlie Subject: [PATCH/RESEND 2/8] drm/tilcdc: panel: Add missing of_node_put Date: Tue, 2 Sep 2014 09:51:16 -0300 Message-Id: <1409662282-7945-3-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 This commit adds the missing calls to of_node_put to release the node that's currently held by the of_get_child_by_name() call in the panel info parsing code. Tested-by: Darren Etheridge Signed-off-by: Ezequiel Garcia --- drivers/gpu/drm/tilcdc/tilcdc_panel.c | 3 +++ 1 file changed, 3 insertions(+) diff --git a/drivers/gpu/drm/tilcdc/tilcdc_panel.c b/drivers/gpu/drm/tilcdc/tilcdc_panel.c index 4c7aa1d..d581c53 100644 --- a/drivers/gpu/drm/tilcdc/tilcdc_panel.c +++ b/drivers/gpu/drm/tilcdc/tilcdc_panel.c @@ -311,6 +311,7 @@ static struct tilcdc_panel_info *of_get_panel_info(struct device_node *np) info = kzalloc(sizeof(*info), GFP_KERNEL); if (!info) { pr_err("%s: allocation failed\n", __func__); + of_node_put(info_np); return NULL; } @@ -331,8 +332,10 @@ static struct tilcdc_panel_info *of_get_panel_info(struct device_node *np) if (ret) { pr_err("%s: error reading panel-info properties\n", __func__); kfree(info); + of_node_put(info_np); return NULL; } + of_node_put(info_np); return info; }