From patchwork Tue Feb 5 05:07:26 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Wen Yang X-Patchwork-Id: 10796883 Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork-2.web.codeaurora.org (Postfix) with ESMTP id 00072746 for ; Tue, 5 Feb 2019 05:23:21 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id E124E2A94A for ; Tue, 5 Feb 2019 05:23:21 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id D43712AE08; Tue, 5 Feb 2019 05:23:21 +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=-4.3 required=2.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,FORGED_HOTMAIL_RCVD2,FREEMAIL_FROM,MAILING_LIST_MULTI, RCVD_IN_DNSWL_MED autolearn=ham version=3.3.1 Received: from bombadil.infradead.org (bombadil.infradead.org [198.137.202.133]) (using TLSv1.2 with cipher AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.wl.linuxfoundation.org (Postfix) with ESMTPS id 868F22A94A for ; Tue, 5 Feb 2019 05:23:21 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20170209; h=Sender: Content-Transfer-Encoding:Content-Type:Cc:List-Subscribe:List-Help:List-Post: List-Archive:List-Unsubscribe:List-Id:MIME-Version:Message-ID:Date:Subject:To :From:Reply-To:Content-ID:Content-Description:Resent-Date:Resent-From: Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID:In-Reply-To:References: List-Owner; bh=wo48LZG7P2S7tw0wCtHmSPeV+rgXvFdJJ/jGWXYnhhs=; b=aKVu3MA29oc9Ba 59qnR1m86KuBs+TqYV0Dsg7uVq173giPIExnK7ybR/tHVUjMTwdXyfwPbcrO/cTyHvhxFgod60KP0 ujMXL5JkVA96gQranD3bhvt+JwtH85uQQ6FmYurHN9bqLJl1A00qsUvvyRw5e41XNmdVnPdMZzX7p PRR7IKHGwNG+9AF4ChxKnDZmigW4u7fHH3hHNS6rDtD3Y311N0IYqr2ALsebWAAMYDphX2lor8Uwx zOGkCjOCFOASTW6jiGb/NXdAHaeCJfjh17ARzTsZTUx7nzxQc8/grUq+dBuOxe09RYyFVttKZO5X+ 4+2/oxnLu2x3eiNWcHMQ==; Received: from localhost ([127.0.0.1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.90_1 #2 (Red Hat Linux)) id 1gqtCZ-0001PQ-6J; Tue, 05 Feb 2019 05:23:19 +0000 Received: from mail-oln040092253096.outbound.protection.outlook.com ([40.92.253.96] helo=APC01-SG2-obe.outbound.protection.outlook.com) by bombadil.infradead.org with esmtps (Exim 4.90_1 #2 (Red Hat Linux)) id 1gqtCO-0001GX-Ma; Tue, 05 Feb 2019 05:23:10 +0000 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=hotmail.com; s=selector1; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=R/0SecrgG7bJTOUndLj5gXDn9/I1P3lQ52op1Qehtco=; b=quPeJLPYjym8q2+vCQ94NmPb/O1yChjr91QFzYA2zIsvlTnbRocLKp4zdDfjXVHbxba2TOYMJprzmvXCDPK+Kh5XBe8M84VZHyBiWQC+QP/hGXZ3QsiPR+ID7goCNmAaalzhmv3qvNGaCTPXHzaREuv2zqFL3bX/ia2gFO76Xw0/w0z64UkA8v/zTtsGnd7E/43xAVgSdNU4iNm0Q8rA3y5M8nJa9SjMMjN4p/Bn7JF/ywzhWjzrpy6mOvev3Sc3kqPWufPJd4Oywt6/59wh0vNH25PaEMaJrnb02HCKLZzwFTZN/dzTKT0T+fYOdtY5A7Gp47jVy1iSzPWKNRqcwg== Received: from HK2APC01FT035.eop-APC01.prod.protection.outlook.com (10.152.248.57) by HK2APC01HT231.eop-APC01.prod.protection.outlook.com (10.152.249.141) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_CBC_SHA384) id 15.20.1580.10; Tue, 5 Feb 2019 05:07:26 +0000 Received: from HK0PR02MB3634.apcprd02.prod.outlook.com (10.152.248.51) by HK2APC01FT035.mail.protection.outlook.com (10.152.248.182) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.1580.10 via Frontend Transport; Tue, 5 Feb 2019 05:07:26 +0000 Received: from HK0PR02MB3634.apcprd02.prod.outlook.com ([fe80::d582:b3ef:f46a:4735]) by HK0PR02MB3634.apcprd02.prod.outlook.com ([fe80::d582:b3ef:f46a:4735%3]) with mapi id 15.20.1580.019; Tue, 5 Feb 2019 05:07:26 +0000 From: wen yang To: "khilman@baylibre.com" Subject: [PATCH v2] soc: amlogic: add missing of_node_put() Thread-Topic: [PATCH v2] soc: amlogic: add missing of_node_put() Thread-Index: AQHUvRCvjjN3BrhOkEe6Gj3fb1uuHw== Date: Tue, 5 Feb 2019 05:07:26 +0000 Message-ID: Accept-Language: zh-CN, en-US Content-Language: en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: x-clientproxiedby: BYAPR11CA0080.namprd11.prod.outlook.com (2603:10b6:a03:f4::21) To HK0PR02MB3634.apcprd02.prod.outlook.com (2603:1096:203:97::14) x-incomingtopheadermarker: OriginalChecksum:8E6208383022AF9AC3B128025CF284821CE70724A01DFCD2F1A4EE0F3967906C; UpperCasedChecksum:6837BC6B4E50DBB667FF9D8ECF1F2E4E4B160B99A7F1EE3FFCAA025740384478; SizeAsReceived:8699; Count:63 x-ms-exchange-messagesentrepresentingtype: 1 x-mailer: git-send-email 2.7.4 x-tmn: [YIHrXstZKTN5B5JordXgAriWMfCRlrvW] x-microsoft-original-message-id: <1549343066-7152-1-git-send-email-yellowriver2010@hotmail.com> x-ms-publictraffictype: Email x-microsoft-exchange-diagnostics: 1; HK2APC01HT231; 6:GwNxXBDSInb7iQYIv2Vc5efO379PNwN6lHoqbRAOfJnQzS8dC9WwNF3RrRu+YYyHBzkisnfZ1SK2PIczYU5ANrETKR7ywljnzuO/Q9PEa3RYQf4RyRcaafK70mh3jSwE9ZPdFgTYasFAkNN+4Dv6NMwwvC0OXtN9oDkX6DSVKMBTGErZyovqZZURxn3B1Tom3VDIa/mxvfo1MP1s0e5B3NiflFF9BenD0JZjgKZ8Z1MZE969FmjFEYgxVGNEvuUIZFUF2NeLZGlWnJYUKRN6AU5KNOpJyB8mS+FPn5ia3hFrayJgaUMCsVbWjLEXR86rK+VWLS4RUL09GXAVvcZPKgCbuHFszSyeOqB5iLlOxK5LN+2O3WDNYeOQUV1GrEigBAiF7h7ZMVo68egvorHpYA+O6+6u/kNbdsVkWv46iBvQnFEn9KZxcL/T0JpuC2WNzYCq1QYbDyyxCK0p0iGd0A==; 5:fzevoL6WtoraHUXdmesWdEqH4LRJe3ZlX+D8cNPqJuh4SoFsCR+UyyIdYx0zY/9dMCc7l41cy6ubx4Cyu3Imh0aXnQ0rxLHukEup5FPr8RqHMPsaZ3IZpECvDeihGhmtmKPN2Da8K0M4KTuJzHRKwaTSHtw9GN9VSU30/AqwBFmcvuqAcFVuUEiMw+0UUWgC0+SgLkvpk4r8RRZIqZ1sFA==; 7:OOhPjpdL5Rm5SjdDLx4UnSGNgwataAf9LP5i41zwh/ulX2+e63V1vqaEFo1gY7/8WmkzVg2jJM4EB/xc445hmz7N49JkcKaarzKc6pMO6kbQSgLBg6SSlMvNKGvavrjuiJpWcdRQWsTPsawktTalzQ== x-incomingheadercount: 63 x-eopattributedmessage: 0 x-ms-exchange-slblob-mailprops: zswcL9HXbeXZrseF0BFKG9CzWWT0ZgiJ1Tx8T4uAcRSJ3Ye9LJcM7aYNhsCLAtjU6AvOoo4DmUD/Fz7thNUDcfN7lKIp3cXz+ERL6NcVNSEiwrN1IugoyFJ0xIKzWq7VCrVS8LvkpE8SapSMXjJvRrSzwa5uVh1tvVbT9F0k7Ke/bgpHuBcy5ZofOnXnC8POgYqHxgbkiBUMW7PmL+rTULJKd14/2lyRoQXeLqZzuy4+pUF9msfk7H47u1XSe59xYzjs4jhJyDJinZr+ahNFwySqgAr9hMSvlxwbCs6jSEyqb9fQQl5IvAlw3dI5vS1hH3+oCqB5z7zY0RTla8nNPOS6/qNo7y9B0d+hHp1WaogmJS3mhTzEr3VIRC0i7H+52ORDok1mQN30n55ts2qKByGfpF5HlaNGXcyz66x7Kt4uC41LWtgcUb1htp8v1v1sP6v3ONIUGCn0eFh8So3LAW7FUyuzsrNv6JUHN25Ku7ECFd6zok8aWVye/YFN/rp/UJBmlg8uSuMqvDDr/oabFyX2BDDWkqPsMdGg0AwHIL4oFlOUW2JmxYEQqY26b6Pcm3iDAJhrGY8h74bG9Xw8ltKPDgo4ymnaMgyJhlx6zcFgzbwmgIb+azRCC7ocqqiN6eswlhm8nJpeOTEerVC5KDbtmX4iFshvJzfFYepBnP1mZTyEciWyF5hRwGEthGKG9KD5Vxx+Xp7/4I0h3Xw5FK7xVcbtDBjC15sL5zza9OKB3ZN+2Oq8jSLp3Y/tU0Cy x-microsoft-antispam: BCL:0; PCL:0; RULEID:(2390118)(7020095)(201702061078)(5061506573)(5061507331)(1603103135)(2017031320274)(201702181274)(2017031323274)(2017031324274)(2017031322404)(1601125500)(1603101475)(1701031045); SRVR:HK2APC01HT231; x-ms-traffictypediagnostic: HK2APC01HT231: x-exchange-antispam-report-cfa-test: BCL:0; PCL:0; RULEID:(4566010)(82015058); SRVR:HK2APC01HT231; BCL:0; PCL:0; RULEID:; SRVR:HK2APC01HT231; x-microsoft-antispam-message-info: 41NGChGfpQGhVsu/hzoVPV/PKFhuLb6JVEiLWt8xvwHWhAJ5FEXpDpr7mjI0Kpbk MIME-Version: 1.0 X-OriginatorOrg: hotmail.com X-MS-Exchange-CrossTenant-RMS-PersistedConsumerOrg: 9a4e3081-9524-43cf-bfc3-dcaef82d5da1 X-MS-Exchange-CrossTenant-Network-Message-Id: e261086f-1302-4cca-02ba-08d68b27d19c X-MS-Exchange-CrossTenant-rms-persistedconsumerorg: 9a4e3081-9524-43cf-bfc3-dcaef82d5da1 X-MS-Exchange-CrossTenant-originalarrivaltime: 05 Feb 2019 05:07:22.7111 (UTC) X-MS-Exchange-CrossTenant-fromentityheader: Internet X-MS-Exchange-CrossTenant-id: 84df9e7f-e9f6-40af-b435-aaaaaaaaaaaa X-MS-Exchange-Transport-CrossTenantHeadersStamped: HK2APC01HT231 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20190204_212308_806743_383D8991 X-CRM114-Status: UNSURE ( 9.53 ) X-CRM114-Notice: Please train this message. X-BeenThere: linux-amlogic@lists.infradead.org X-Mailman-Version: 2.1.21 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: "linux-amlogic@lists.infradead.org" , Neil Armstrong , "linux-kernel@vger.kernel.org" , "linux-arm-kernel@lists.infradead.org" , wen yang Sender: "linux-amlogic" Errors-To: linux-amlogic-bounces+patchwork-linux-amlogic=patchwork.kernel.org@lists.infradead.org X-Virus-Scanned: ClamAV using ClamSMTP The call to of_parse_phandle returns a node pointer with refcount incremented thus it must be explicitly decremented here after the last usage. Fixes: d4983983 ("soc: amlogic: add meson-canvas driver") Signed-off-by: Wen Yang Reviewed-by: Neil Armstrong Cc: Kevin Hilman Cc: Neil Armstrong Cc: linux-arm-kernel@lists.infradead.org Cc: linux-amlogic@lists.infradead.org Cc: linux-kernel@vger.kernel.org --- drivers/soc/amlogic/meson-canvas.c | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/drivers/soc/amlogic/meson-canvas.c b/drivers/soc/amlogic/meson-canvas.c index fce33ca..87a6c6e 100644 --- a/drivers/soc/amlogic/meson-canvas.c +++ b/drivers/soc/amlogic/meson-canvas.c @@ -57,9 +57,12 @@ struct meson_canvas *meson_canvas_get(struct device *dev) return ERR_PTR(-ENODEV); canvas_pdev = of_find_device_by_node(canvas_node); - if (!canvas_pdev) + if (!canvas_pdev) { + of_node_put(canvas_node); return ERR_PTR(-EPROBE_DEFER); + } + of_node_put(canvas_node); return dev_get_drvdata(&canvas_pdev->dev); } EXPORT_SYMBOL_GPL(meson_canvas_get);