Received: by 2002:ad5:474a:0:0:0:0:0 with SMTP id i10csp2463360imu; Sun, 13 Jan 2019 02:42:05 -0800 (PST) X-Google-Smtp-Source: ALg8bN5FLmVwzx67K1vO0Az7az+xSdvyzR1fuEknKoBtjLiTLriz4mbfejvsdx5tPcjIokPbTP1E X-Received: by 2002:a17:902:a03:: with SMTP id 3mr21557349plo.112.1547376125755; Sun, 13 Jan 2019 02:42:05 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1547376125; cv=none; d=google.com; s=arc-20160816; b=RnHjxyRjN+kDLABDtBJb8btx8KPW34GgxqbDgxhRbYCMjJlkI+tR2poIqCNndqUcmm 5DmZFUZxiW6alYJftM78b7V11+GzPdD9QyCgmmIpO7RWAkWSEHtFHy6k7BuQgqPQ55dJ NAw4vr/2vRuZLEhg7WPTZgkHTvZ57Yui3MrKvx8EE/Ao15Q1tsitjAH/whMisz4LWE3S dN7+admBXtHzOr2O4XlzKvgCu9GOZOAYK+rs/cZH7Dt1bHGwnfRTIvzm9ysTMh73PYgG nvKH7qIQl8uhWjZpiQDDxxvgSEETJFslpeuWYB7x7m3IfWvLsBfzInz2lHSzseSZuGgL oT1w== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:references:in-reply-to:message-id:date :subject:cc:to:from; bh=6JWrxDGeYNBtu+I/Xin3D5yike7Azf2u69wIgF/esFI=; b=ZJ0u+OQk2R2zgUCgvhQrq1wXbfVkZ8yiXxnQas4IHE/5UUTOdup+uCDKkij7fH+wbg Hp1FyyGAFxYmkDreZTwm3cJnnD7LZKaAxE7R035pDMH6wR4RGFz2QP55WhOKXxq2k2HB 7u8wyGwjbi8oXhYpV5OzDMx+bTacJI4ro2P44AwzSfybNsl92v3j8kyO00vARVBxXrWU VQmSKfKb+fZ/BbvfoqEWqhfwUi/eLNRAoCZKw4ZdN8Zxy9qYbbHfutMPtXUzJjDk5nyR B2ijSW+wdPExzJSjrxczkcaQwmKS3pYMl/QBu2nghH0qR+N0CkHTS7UvCKMFjsm3HFD0 ifTA== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id b24si33521263pgg.288.2019.01.13.02.41.34; Sun, 13 Jan 2019 02:42:05 -0800 (PST) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726733AbfAMKWC (ORCPT + 99 others); Sun, 13 Jan 2019 05:22:02 -0500 Received: from mail3-relais-sop.national.inria.fr ([192.134.164.104]:47950 "EHLO mail3-relais-sop.national.inria.fr" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726628AbfAMKV5 (ORCPT ); Sun, 13 Jan 2019 05:21:57 -0500 X-IronPort-AV: E=Sophos;i="5.56,473,1539640800"; d="scan'208";a="291728763" Received: from palace.lip6.fr ([132.227.105.202]) by mail3-relais-sop.national.inria.fr with ESMTP/TLS/AES128-SHA256; 13 Jan 2019 11:21:54 +0100 From: Julia Lawall To: Laurent Pinchart Cc: kernel-janitors@vger.kernel.org, Kieran Bingham , David Airlie , Daniel Vetter , dri-devel@lists.freedesktop.org, linux-renesas-soc@vger.kernel.org, linux-kernel@vger.kernel.org Subject: [PATCH 1/3] drm: rcar-du: add missing of_node_put Date: Sun, 13 Jan 2019 10:44:49 +0100 Message-Id: <1547372691-28324-2-git-send-email-Julia.Lawall@lip6.fr> X-Mailer: git-send-email 1.9.1 In-Reply-To: <1547372691-28324-1-git-send-email-Julia.Lawall@lip6.fr> References: <1547372691-28324-1-git-send-email-Julia.Lawall@lip6.fr> Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Add an of_node_put when the result of of_graph_get_remote_port_parent is not available. The semantic match that finds this problem is as follows (http://coccinelle.lip6.fr): // @r exists@ local idexpression e; expression x; @@ e = of_graph_get_remote_port_parent(...); ... when != x = e when != true e == NULL when != of_node_put(e) when != of_fwnode_handle(e) ( return e; | *return ...; ) // Signed-off-by: Julia Lawall --- drivers/gpu/drm/rcar-du/rcar_du_kms.c | 1 + 1 file changed, 1 insertion(+) diff --git a/drivers/gpu/drm/rcar-du/rcar_du_kms.c b/drivers/gpu/drm/rcar-du/rcar_du_kms.c index 9c7007d..bc3fcb3 100644 --- a/drivers/gpu/drm/rcar-du/rcar_du_kms.c +++ b/drivers/gpu/drm/rcar-du/rcar_du_kms.c @@ -331,6 +331,7 @@ static int rcar_du_encoders_init_one(struct rcar_du_device *rcdu, dev_dbg(rcdu->dev, "connected entity %pOF is disabled, skipping\n", entity); + of_node_put(entity); return -ENODEV; }