From patchwork Fri Jul 11 14:18:48 2014 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Ezequiel Garcia X-Patchwork-Id: 4535461 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 27B2A9F1C4 for ; Fri, 11 Jul 2014 15:36:04 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id 5CC992012E for ; Fri, 11 Jul 2014 15:36:00 +0000 (UTC) Received: from gabe.freedesktop.org (gabe.freedesktop.org [131.252.210.177]) by mail.kernel.org (Postfix) with ESMTP id 4336120158 for ; Fri, 11 Jul 2014 15:35:58 +0000 (UTC) Received: from gabe.freedesktop.org (localhost [127.0.0.1]) by gabe.freedesktop.org (Postfix) with ESMTP id 6D5846E281; Fri, 11 Jul 2014 08:35:57 -0700 (PDT) X-Original-To: dri-devel@lists.freedesktop.org Delivered-To: dri-devel@lists.freedesktop.org Received: from mail-yh0-f54.google.com (mail-yh0-f54.google.com [209.85.213.54]) by gabe.freedesktop.org (Postfix) with ESMTP id CA4E76E836 for ; Fri, 11 Jul 2014 07:23:19 -0700 (PDT) Received: by mail-yh0-f54.google.com with SMTP id i57so433991yha.13 for ; Fri, 11 Jul 2014 07:23:19 -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=DpUyRHMOU6hoBW1PKNhbS6UW36IJzDEvVdCd7RK8HXQ=; b=EuVlfydzHjvJTSiUBvRaC0a5tS5QwmTXuu+m3UUDTb7QGSOji9vTkTyy6jsDmq+cES RxD0yblHN+szTzYv1tDeypLLESul+60Vi2ZAeuypqq+dnICOsKXPXvVdq/qmXELPgeB0 TRIg0wPtOc2Xb/foq9B6dpHwhjm41Tt11hk1ppCKzhOpHJ77+q5TAN9VxwgcOtGA/nOz wzXSYjiryFIM1nAZ2SUSkw3vNXFLr3pezzBTSNi/iozQclu/uuyNz+kAdwF0cjvgKFat yKXyVjGOWxpzsKPPaVi9vdl9a1rJiJMA1QSPgEmqU9awfrtzFvlm0n+eRgpSpWBHjpHd Ue2g== X-Gm-Message-State: ALoCoQnkYVe88rJL44w73SRV3UWGkVW9SgxNRNkGSfL/UMN+liWXFETQoabHkKL5RFvXY2Hgk9Y/ X-Received: by 10.236.228.40 with SMTP id e38mr9851995yhq.76.1405088599399; Fri, 11 Jul 2014 07:23:19 -0700 (PDT) Received: from localhost.localdomain ([190.2.108.113]) by mx.google.com with ESMTPSA id f63sm5309293yhf.1.2014.07.11.07.23.17 for (version=TLSv1.2 cipher=ECDHE-RSA-AES128-SHA bits=128/128); Fri, 11 Jul 2014 07:23:19 -0700 (PDT) From: Ezequiel Garcia To: , , Dave Airlie Subject: [PATCH 2/8] drm/tilcdc: panel: Add missing of_node_put Date: Fri, 11 Jul 2014 11:18:48 -0300 Message-Id: <1405088334-11215-3-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 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. 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; }