From patchwork Wed Aug 10 13:44:56 2016 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Wei Yongjun X-Patchwork-Id: 9273733 Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork.web.codeaurora.org (Postfix) with ESMTP id 6FE6E600CB for ; Wed, 10 Aug 2016 19:29:22 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 5AC7C283E1 for ; Wed, 10 Aug 2016 19:29:22 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 4F06528417; Wed, 10 Aug 2016 19:29:22 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on pdx-wl-mail.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-6.8 required=2.0 tests=BAYES_00, DKIM_ADSP_CUSTOM_MED, DKIM_SIGNED, FREEMAIL_FROM, RCVD_IN_DNSWL_HI, T_DKIM_INVALID autolearn=ham version=3.3.1 Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id EB306283E1 for ; Wed, 10 Aug 2016 19:29:21 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S934350AbcHJT3G (ORCPT ); Wed, 10 Aug 2016 15:29:06 -0400 Received: from mail-pa0-f65.google.com ([209.85.220.65]:35816 "EHLO mail-pa0-f65.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S934194AbcHJT3F (ORCPT ); Wed, 10 Aug 2016 15:29:05 -0400 Received: by mail-pa0-f65.google.com with SMTP id cf3so3265940pad.2 for ; Wed, 10 Aug 2016 12:29:04 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=from:to:cc:subject:date:message-id:mime-version :content-transfer-encoding; bh=Llie9ZDzy7SDKMn7h2V8fSwAJ5RbVgIQg3ZP07uDvjw=; b=stpuXWGcPGP7JXH6wRqTNTucPl4TXXIjTbWQtwVkk1JQ6jqK6TInHM8/BvL7FIn+DX R70z6tmsmd5buxPvGHco4YUhGTmaRlaZLuHZ08FJBjw/AcRzo27mq2uXoMv3a4LCFO2A 7rnqb0Ml2VhN6bjr5CytdfgkXnPR9aZC1GuHjsN/1df37xSDn+SqdOw/zGkfSS+1qzVi SaUSSvHs+aMkSGw7OjeUBbqDHqMD9CYUjk1mP/g8Uru9XL/Av9FasVUJJ1IWj5AwiLj4 ovMo/bwQmDEfdtjPf0CmXDnDrUYTHtwRdVDJ+bFzv81N1PiANBAvIw+J2AdxmK//ij5T afWQ== 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:mime-version :content-transfer-encoding; bh=Llie9ZDzy7SDKMn7h2V8fSwAJ5RbVgIQg3ZP07uDvjw=; b=SlfJ5c8nGhcqCcv1qiKuBIS24JKw04yEuikTT0JMtIQeSD8Nl7FBDGDNx4bFFoYmlL 51SG79UBPPgXLTULVG6LWttcIVaXz8bYRcoNLDjIIdGQywazpaEyg1b94PtswS7qqU9V 37fYnzp8+m1z8pZ0EDWTzxT4sYstjzzKA2vAxT78l7JOiCkb7uByvwH1W6QQ9BmekFaR CoWHJ5F/roXP78bd/TckYHTDsSgTmYpAG4clfFDM1nlBW4vRmdJal9WzQ1qQvD9Slj5q TyU+p+PhYK2umgdYi/11dG/Xe4M+8uEZ6Qo4f63tOO+eMRsIBVBVgpqtGpVlM87I7WxG kn7w== X-Gm-Message-State: AEkoouvHZxbCcjPs/Yy/QQ6VlbhlfmtLt3Bj5mnEc9IqsthN5jkYRoQzdLQi5b0T91Quuw== X-Received: by 10.66.177.7 with SMTP id cm7mr7332314pac.132.1470836702342; Wed, 10 Aug 2016 06:45:02 -0700 (PDT) Received: from bogon.localdomain (ec2-52-192-197-227.ap-northeast-1.compute.amazonaws.com. [52.192.197.227]) by smtp.gmail.com with ESMTPSA id m24sm64289681pfi.34.2016.08.10.06.44.59 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Wed, 10 Aug 2016 06:45:01 -0700 (PDT) From: Wei Yongjun To: Vinod Koul , Dan Williams Cc: Wei Yongjun , dmaengine@vger.kernel.org Subject: [PATCH -next] dmaengine: fsl_raid: add missing of_node_put() in fsl_re_probe() Date: Wed, 10 Aug 2016 13:44:56 +0000 Message-Id: <1470836696-11921-1-git-send-email-weiyj.lk@gmail.com> X-Mailer: git-send-email 2.7.4 MIME-Version: 1.0 Sender: dmaengine-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: dmaengine@vger.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP When terminating for_each_compatible_node() iteration with break or return, of_node_put() should be used to prevent stale device node references from being left behind. Found by Coccinelle. Signed-off-by: Wei Yongjun --- drivers/dma/fsl_raid.c | 1 + 1 file changed, 1 insertion(+) -- To unsubscribe from this list: send the line "unsubscribe dmaengine" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html diff --git a/drivers/dma/fsl_raid.c b/drivers/dma/fsl_raid.c index a8c8b9e..303623f 100644 --- a/drivers/dma/fsl_raid.c +++ b/drivers/dma/fsl_raid.c @@ -828,6 +828,7 @@ static int fsl_re_probe(struct platform_device *ofdev) rc = of_property_read_u32(np, "reg", &off); if (rc) { dev_err(dev, "Reg property not found in JQ node\n"); + of_node_put(np); return -ENODEV; } /* Find out the Job Rings present under each JQ */