Received: by 2002:ac0:bc90:0:0:0:0:0 with SMTP id a16csp273958img; Thu, 21 Mar 2019 20:08:21 -0700 (PDT) X-Google-Smtp-Source: APXvYqy+a9CXi7ZL8Shn8BUfKne6+j0VHPKnb9JtHRmUzicHNGwlKpKIiOrs/jNOVKK7PJ3cq21n X-Received: by 2002:a17:902:9341:: with SMTP id g1mr7184395plp.80.1553224101318; Thu, 21 Mar 2019 20:08:21 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1553224101; cv=none; d=google.com; s=arc-20160816; b=Waqh0C0i3o6+6rbCRV3j0p/AIJMQSiXZQ4wHSJ0rrM9qcrjLt9gFandFAz2Aqt96dH 1TkC1crnbZOxfUyV3DHdsj3zmBxV8SOIYhp1QqMJqF/5n63zkySMGutaJXLm8S71h3Zi rF8A6kuNqRzJ2eDOxL3mu/rUh/P3iS+t0hMXS9ZojBn0UE3IirlfdseSaJplxjLYbml8 x+CMX7SHgyQ8n7VDzeg9N4bSl40i76PJjss2V6s4Pc5f8UAEWc/B1Nynp8ntuYyxof5E XRHe5iy2vmwCqt5UZO+ziJ3wIllsoI4909DnLwyt3MwfwTfPbaeQFH9PW0diY1Aiki+7 N1JQ== 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=OVmMrPS3CKUiR3dbeV0TV5npMlEMW2jl+Z7SukaasIY=; b=hKVkxC4ENr/NZ9t7wPc0pOjaayheK31BlFY4FPdx8abSwkjShwnNIUwgVHIMibFxHF OcQ/0PyhRuCfarX9ohSHyWtQcqWUyaFozsE4+VBNzcb6zGF0xyD0BVUrjIXyaiRt4/Di JoJbyimY6zJTAgvfpR6OJSy62e4ZRCPnsD9tZR+pl4IEf7usL9w9yCtotaab++SGpYfG W6qMyiCxuw9jbqhnIxhSE1S/WUoixraawZsH/u57eQPuF25stFjf3UHY5ztrcEmfJFI8 qtOkQlUHSxS23rlXL/RbO8krFoY8yJrNfLV5GHFbAYMokc2bvfktVJzpAn32ik+6jK9O o9gQ== 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 e21si5402138pfn.179.2019.03.21.20.08.03; Thu, 21 Mar 2019 20:08:21 -0700 (PDT) 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 S1727650AbfCVDHQ (ORCPT + 99 others); Thu, 21 Mar 2019 23:07:16 -0400 Received: from out1.zte.com.cn ([202.103.147.172]:58272 "EHLO mxct.zte.com.cn" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1727222AbfCVDHQ (ORCPT ); Thu, 21 Mar 2019 23:07:16 -0400 Received: from mse01.zte.com.cn (unknown [10.30.3.20]) by Forcepoint Email with ESMTPS id 45378639EB10640BA4D1; Fri, 22 Mar 2019 11:07:14 +0800 (CST) Received: from notes_smtp.zte.com.cn ([10.30.1.239]) by mse01.zte.com.cn with ESMTP id x2M35osm078093; Fri, 22 Mar 2019 11:05:50 +0800 (GMT-8) (envelope-from wen.yang99@zte.com.cn) Received: from fox-host8.localdomain ([10.74.120.8]) by szsmtp06.zte.com.cn (Lotus Domino Release 8.5.3FP6) with ESMTP id 2019032211062708-5922981 ; Fri, 22 Mar 2019 11:06:27 +0800 From: Wen Yang To: linux-kernel@vger.kernel.org Cc: wang.yi59@zte.com.cn, Wen Yang , Benjamin Herrenschmidt , Paul Mackerras , Michael Ellerman , linuxppc-dev@lists.ozlabs.org Subject: [PATCH 4/5] powerpc/embedded6xx: fix possible object reference leak Date: Fri, 22 Mar 2019 11:05:54 +0800 Message-Id: <1553223955-7350-4-git-send-email-wen.yang99@zte.com.cn> X-Mailer: git-send-email 1.8.3.1 In-Reply-To: <1553223955-7350-1-git-send-email-wen.yang99@zte.com.cn> References: <1553223955-7350-1-git-send-email-wen.yang99@zte.com.cn> X-MIMETrack: Itemize by SMTP Server on SZSMTP06/server/zte_ltd(Release 8.5.3FP6|November 21, 2013) at 2019-03-22 11:06:27, Serialize by Router on notes_smtp/zte_ltd(Release 9.0.1FP7|August 17, 2016) at 2019-03-22 11:05:35, Serialize complete at 2019-03-22 11:05:35 X-MAIL: mse01.zte.com.cn x2M35osm078093 Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org The call to of_find_compatible_node returns a node pointer with refcount incremented thus it must be explicitly decremented after the last usage. Detected by coccinelle with the following warnings: ./arch/powerpc/platforms/embedded6xx/mvme5100.c:89:2-8: ERROR: missing of_node_put; acquired a node pointer with refcount incremented on line 80, but without a corresponding object release within this function. Signed-off-by: Wen Yang Cc: Benjamin Herrenschmidt Cc: Paul Mackerras Cc: Michael Ellerman Cc: linuxppc-dev@lists.ozlabs.org Cc: linux-kernel@vger.kernel.org --- arch/powerpc/platforms/embedded6xx/mvme5100.c | 1 + 1 file changed, 1 insertion(+) diff --git a/arch/powerpc/platforms/embedded6xx/mvme5100.c b/arch/powerpc/platforms/embedded6xx/mvme5100.c index 273dfa3..660654f4 100644 --- a/arch/powerpc/platforms/embedded6xx/mvme5100.c +++ b/arch/powerpc/platforms/embedded6xx/mvme5100.c @@ -86,6 +86,7 @@ static void __init mvme5100_pic_init(void) cirq = irq_of_parse_and_map(cp, 0); if (!cirq) { pr_warn("mvme5100_pic_init: no cascade interrupt?\n"); + of_node_put(cp); return; } -- 2.9.5