Received: by 2002:a25:4158:0:0:0:0:0 with SMTP id o85csp3435916yba; Tue, 23 Apr 2019 03:55:02 -0700 (PDT) X-Google-Smtp-Source: APXvYqwuFMQap9mbyaH9jGvCNxC5oOieNXN7LD66QJrafs9dqdVBj/5u1jbxlaFtYqq0gQQ3kp28 X-Received: by 2002:a65:55c6:: with SMTP id k6mr6949679pgs.134.1556016902854; Tue, 23 Apr 2019 03:55:02 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1556016902; cv=none; d=google.com; s=arc-20160816; b=WmDWs8ljlpbBPWdobjoLuNe8B/kTXEOeR+iiFOr8VoVcL73pfqTOJf6FBqFtJcMz6g GNldm6VNrZ9teuS87Sxj7aMLFG6eEwUVKnRtpBhxfL2MkcwWjwLNMJFEynkoRw4JzZRM ef+eTNE6abF5fqtlHpPYiX/Z5zi5YEnAhvqcr4wjO3uhOOaILe5h+K1u4Vsx0uaCF3b3 BCYMEMcCkzS5PBHw29GUV0hMcbz6mmV2smVKEmb6vXMo4r/FfTTMvGCYh900JhjJQrUE 72cHmBhQXNtu0kXk5D2EOaSCplvTtywgNPEDT5rKqCYDuYDcp18Y2ZLw5cYTD3Gi0jqg jRVA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:cc:to:subject:message-id:date:from :in-reply-to:references:mime-version:dkim-signature; bh=Dm0VsNuXtWaNq7ax6YiLsGrK/V6ALwGWhvC/p/yldeQ=; b=gUNdSvKHurZ16G4LQE9GGwPXnp2yW4JWvbAHk4sOSRMbW6DzSlC0ii1WNSFhxqmH6x GIsso9WUd6XmtB2JOKgMM6HW6p0QItDRN5gwncnPXJTQSGTYsj7A2fNUMTpD4ep2YX0I v6MszgnWsIGY7tr/tswnsehoW3XcRnAllQ9iQS8KexzUaerXVoXOxQdjcBv362U3K/uo tWKYYEKWoX35JXQjeFaKjlHfoJMm8FQRXieIcg7lws5yjbyThV1rJtiQiT44PiOSIvAS w5uDiPH0STCJ9VE8HjAUqr8wZHhtT+kohZxW/QjOcb4GuiOpzFodX8d1aYlWiwFV1pjJ U7Pg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=xGW6I8SL; 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; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id z8si14231931pgp.185.2019.04.23.03.54.47; Tue, 23 Apr 2019 03:55:02 -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; dkim=pass header.i=@linaro.org header.s=google header.b=xGW6I8SL; 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; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1727495AbfDWKxw (ORCPT + 99 others); Tue, 23 Apr 2019 06:53:52 -0400 Received: from mail-lf1-f68.google.com ([209.85.167.68]:34092 "EHLO mail-lf1-f68.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1727305AbfDWKxw (ORCPT ); Tue, 23 Apr 2019 06:53:52 -0400 Received: by mail-lf1-f68.google.com with SMTP id h5so11387781lfm.1 for ; Tue, 23 Apr 2019 03:53:50 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; h=mime-version:references:in-reply-to:from:date:message-id:subject:to :cc; bh=Dm0VsNuXtWaNq7ax6YiLsGrK/V6ALwGWhvC/p/yldeQ=; b=xGW6I8SLppPprtIGaTLcbEV+AlP6ePI7QoAYOg1ibgPujKzem3fZ+yRyt7gcgyxZnF 2yRxJawQZaK68b1LVsWRSxlE3JWN3FUHSIE3w5mYSTZjRy3aCECeZznKnv1ZYyA3c6pO HWjwv+DBO48MZ8qaGoS9C9cc4BplA7XW4k3Ivfxwy5guyBwTSb5v7as5d3qyB20YOGuu xKF+2w9fXa6QLZnz18cxW+bbSkCHAxs8f86zrqJzELOrLuzBIrjO3NcNOwLex6wvMYc4 1aDzysiGATSij7NQNZvjACho1ewOiIlbb1ZSjWhLidzF0XNL38Ok8QePO0j7VJMwPalt gBdQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc; bh=Dm0VsNuXtWaNq7ax6YiLsGrK/V6ALwGWhvC/p/yldeQ=; b=S/i6YmBi8zhwcl3lGdz04xbyxPF+JAVXPxHRJom1oPvZAlVau9frZhkPYI+7F4KCdS rHUSHqrQl9q/H8jgjvzh6Ro7XVBrErPub/VeRDhpopDAcsQwk8njPbqE9xfMUK5BdVtS Xzjojb4CyarZJh3/KVn0RrxqVxsUJKr2XAGe6sLfi3tT939Mn2bRyyfseJKG7OPpSkWp 60ZdjG1yDEEncJ5e+1QnD1VYKhD3COX9+3LB99zkGJ92wfPKqpWCPavISKQfg8bO/8DE IxXm3FbfvCozsyoldvX1AOls4Z854THLuGrutRJNNOb+gPVGxe8mCQJH49VZJpTikk8q sCBg== X-Gm-Message-State: APjAAAWto8C2lro+v08IUCKaUP19in+gbddmOJkzh20N4xPKpk41bkTS U/Zi9dMkaT+pwvKZdDrkxqsvb+Xlc2QWPWIqFnCtgEOu X-Received: by 2002:a19:f001:: with SMTP id p1mr14368867lfc.27.1556016830067; Tue, 23 Apr 2019 03:53:50 -0700 (PDT) MIME-Version: 1.0 References: <1555048943-39589-1-git-send-email-wen.yang99@zte.com.cn> <1555048943-39589-6-git-send-email-wen.yang99@zte.com.cn> In-Reply-To: <1555048943-39589-6-git-send-email-wen.yang99@zte.com.cn> From: Linus Walleij Date: Tue, 23 Apr 2019 12:53:38 +0200 Message-ID: Subject: Re: [PATCH 5/5] pinctrl: zte: fix leaked of_node references To: Wen Yang Cc: "linux-kernel@vger.kernel.org" , wang.yi59@zte.com.cn, Jun Nie , Shawn Guo , "open list:GPIO SUBSYSTEM" Content-Type: text/plain; charset="UTF-8" Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Fri, Apr 12, 2019 at 8:01 AM Wen Yang wrote: > The call to of_parse_phandle returns a node pointer with refcount > incremented thus it must be explicitly decremented after the last > usage. > > Detected by coccinelle with the following warnings: > ./drivers/pinctrl/zte/pinctrl-zx.c:415:2-8: ERROR: missing of_node_put; acquired a node pointer with refcount incremented on line 407, but without a corresponding object release within this function. > ./drivers/pinctrl/zte/pinctrl-zx.c:422:2-8: ERROR: missing of_node_put; acquired a node pointer with refcount incremented on line 407, but without a corresponding object release within this function. > ./drivers/pinctrl/zte/pinctrl-zx.c:436:2-8: ERROR: missing of_node_put; acquired a node pointer with refcount incremented on line 407, but without a corresponding object release within this function. > ./drivers/pinctrl/zte/pinctrl-zx.c:444:2-8: ERROR: missing of_node_put; acquired a node pointer with refcount incremented on line 407, but without a corresponding object release within this function. > ./drivers/pinctrl/zte/pinctrl-zx.c:448:1-7: ERROR: missing of_node_put; acquired a node pointer with refcount incremented on line 407, but without a corresponding object release within this function. > > Signed-off-by: Wen Yang > Cc: Linus Walleij > Cc: Jun Nie > Cc: Shawn Guo > Cc: Linus Walleij > Cc: linux-gpio@vger.kernel.org > Cc: linux-kernel@vger.kernel.org Patch applied with Shawn's ACK. Yours, Linus Walleij