From patchwork Mon Feb 17 09:03:33 2014 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Sachin Kamat X-Patchwork-Id: 24743 Return-Path: X-Original-To: linaro@patches.linaro.org Delivered-To: linaro@patches.linaro.org Received: from mail-ie0-f199.google.com (mail-ie0-f199.google.com [209.85.223.199]) by ip-10-151-82-157.ec2.internal (Postfix) with ESMTPS id 64BD0202B2 for ; Mon, 17 Feb 2014 09:12:40 +0000 (UTC) Received: by mail-ie0-f199.google.com with SMTP id rl12sf2068732iec.10 for ; Mon, 17 Feb 2014 01:12:39 -0800 (PST) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:mime-version:delivered-to:from:to:cc:subject :date:message-id:in-reply-to:references:sender:precedence:list-id :x-original-sender:x-original-authentication-results:mailing-list :list-post:list-help:list-archive:list-unsubscribe; bh=+7Yp+9kIQAoMZqJ+WJNjGU+NlVGJa6geprKxnIUB6XQ=; b=JBou8a6sMvs0w2VQ93NK0cP1U4y7Cf97rOTyrFhVI/ytDL+WkuPcRnNr62omhpj+nw BQY/UNZNWs/2zr6Iv5XJqPRjFUR1sipIxODq96oFaFqnCoiOxfhtQmgd+mSJr+DIcNt8 LWUTy+SMYahn1uKJwBnB/8q/UeHg+5ctkj+pBRiskUGqokEzjE2oRN2xOy+Nzi3gU3uy 8p/OXsolFpBWAypRnV5ck3mYETfzhu+q5APpnktbwjaMVXkE86kKDvISYD/b559EDI8u q6X1nYQ4tuNW3w02Io6Q2MCA2p+l7e0hKt6jUxEQb0zg5oxaLY6g6H8phEk8L9PDAhDM wALA== X-Gm-Message-State: ALoCoQkcCpIWIrvZr8dIPRN8+W/WhsJigRWTf86lSivxNEOyli3CxWSdELxJh/nOiHXQpghengEU X-Received: by 10.182.246.39 with SMTP id xt7mr9922137obc.40.1392628359585; Mon, 17 Feb 2014 01:12:39 -0800 (PST) MIME-Version: 1.0 X-BeenThere: patchwork-forward@linaro.org Received: by 10.140.35.208 with SMTP id n74ls824896qgn.65.gmail; Mon, 17 Feb 2014 01:12:39 -0800 (PST) X-Received: by 10.220.106.84 with SMTP id w20mr16365089vco.18.1392628359512; Mon, 17 Feb 2014 01:12:39 -0800 (PST) Received: from mail-vc0-f170.google.com (mail-vc0-f170.google.com [209.85.220.170]) by mx.google.com with ESMTPS id si7si4325528vdc.128.2014.02.17.01.12.39 for (version=TLSv1 cipher=ECDHE-RSA-RC4-SHA bits=128/128); Mon, 17 Feb 2014 01:12:39 -0800 (PST) Received-SPF: neutral (google.com: 209.85.220.170 is neither permitted nor denied by best guess record for domain of patch+caf_=patchwork-forward=linaro.org@linaro.org) client-ip=209.85.220.170; Received: by mail-vc0-f170.google.com with SMTP id hu8so11683067vcb.29 for ; Mon, 17 Feb 2014 01:12:39 -0800 (PST) X-Received: by 10.52.243.102 with SMTP id wx6mr13702510vdc.12.1392628359439; Mon, 17 Feb 2014 01:12:39 -0800 (PST) X-Forwarded-To: patchwork-forward@linaro.org X-Forwarded-For: patch@linaro.org patchwork-forward@linaro.org Delivered-To: patch@linaro.org Received: by 10.220.174.196 with SMTP id u4csp122920vcz; Mon, 17 Feb 2014 01:12:39 -0800 (PST) X-Received: by 10.68.89.162 with SMTP id bp2mr2204558pbb.151.1392628358535; Mon, 17 Feb 2014 01:12:38 -0800 (PST) Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id w4si14138048pbk.24.2014.02.17.01.12.37; Mon, 17 Feb 2014 01:12:37 -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; Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752986AbaBQJMa (ORCPT + 27 others); Mon, 17 Feb 2014 04:12:30 -0500 Received: from mail-pb0-f53.google.com ([209.85.160.53]:51694 "EHLO mail-pb0-f53.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752226AbaBQJJN (ORCPT ); Mon, 17 Feb 2014 04:09:13 -0500 Received: by mail-pb0-f53.google.com with SMTP id md12so15040720pbc.12 for ; Mon, 17 Feb 2014 01:09:12 -0800 (PST) X-Received: by 10.66.13.138 with SMTP id h10mr2212487pac.148.1392628152883; Mon, 17 Feb 2014 01:09:12 -0800 (PST) Received: from linaro.sisodomain.com ([115.113.119.130]) by mx.google.com with ESMTPSA id ug2sm112608647pac.21.2014.02.17.01.09.10 for (version=TLSv1.1 cipher=ECDHE-RSA-RC4-SHA bits=128/128); Mon, 17 Feb 2014 01:09:12 -0800 (PST) From: Sachin Kamat To: linux-kernel@vger.kernel.org Cc: broonie@kernel.org, lgirdwood@gmail.com, sachin.kamat@linaro.org Subject: [PATCH 5/9] regulator: max77693: Add missing of_node_put Date: Mon, 17 Feb 2014 14:33:33 +0530 Message-Id: <1392627817-26957-5-git-send-email-sachin.kamat@linaro.org> X-Mailer: git-send-email 1.7.9.5 In-Reply-To: <1392627817-26957-1-git-send-email-sachin.kamat@linaro.org> References: <1392627817-26957-1-git-send-email-sachin.kamat@linaro.org> Sender: linux-kernel-owner@vger.kernel.org Precedence: list List-ID: X-Mailing-List: linux-kernel@vger.kernel.org X-Removed-Original-Auth: Dkim didn't pass. X-Original-Sender: sachin.kamat@linaro.org X-Original-Authentication-Results: mx.google.com; spf=neutral (google.com: 209.85.220.170 is neither permitted nor denied by best guess record for domain of patch+caf_=patchwork-forward=linaro.org@linaro.org) smtp.mail=patch+caf_=patchwork-forward=linaro.org@linaro.org Mailing-list: list patchwork-forward@linaro.org; contact patchwork-forward+owners@linaro.org X-Google-Group-Id: 836684582541 List-Post: , List-Help: , List-Archive: List-Unsubscribe: , Add of_node_put to decrement the ref count. Signed-off-by: Sachin Kamat --- drivers/regulator/max77693.c | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/drivers/regulator/max77693.c b/drivers/regulator/max77693.c index 057d040e6feb..d6807fd7eadc 100644 --- a/drivers/regulator/max77693.c +++ b/drivers/regulator/max77693.c @@ -176,13 +176,16 @@ static int max77693_pmic_dt_parse_rdata(struct device *dev, rmatch = devm_kzalloc(dev, sizeof(*rmatch) * ARRAY_SIZE(regulators), GFP_KERNEL); - if (!rmatch) + if (!rmatch) { + of_node_put(np); return -ENOMEM; + } for (i = 0; i < ARRAY_SIZE(regulators); i++) rmatch[i].name = regulators[i].name; matched = of_regulator_match(dev, np, rmatch, ARRAY_SIZE(regulators)); + of_node_put(np); if (matched <= 0) return matched; *rdata = devm_kzalloc(dev, sizeof(**rdata) * matched, GFP_KERNEL);