From patchwork Wed Mar 29 16:21:11 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Johan Hovold X-Patchwork-Id: 9651909 X-Patchwork-Delegate: sameo@linux.intel.com 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 D7D8A60349 for ; Wed, 29 Mar 2017 16:22:50 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id C9D1C28482 for ; Wed, 29 Mar 2017 16:22:50 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id BCA02284D6; Wed, 29 Mar 2017 16:22:50 +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.3 required=2.0 tests=BAYES_00,DKIM_SIGNED, RCVD_IN_DNSWL_HI, RCVD_IN_SORBS_SPAM, T_DKIM_INVALID autolearn=unavailable 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 4D86828482 for ; Wed, 29 Mar 2017 16:22:50 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1753828AbdC2QWE (ORCPT ); Wed, 29 Mar 2017 12:22:04 -0400 Received: from mail-lf0-f68.google.com ([209.85.215.68]:36602 "EHLO mail-lf0-f68.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1753309AbdC2QV7 (ORCPT ); Wed, 29 Mar 2017 12:21:59 -0400 Received: by mail-lf0-f68.google.com with SMTP id n78so2156830lfi.3; Wed, 29 Mar 2017 09:21:57 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=sender:from:to:cc:subject:date:message-id:in-reply-to:references; bh=fShN4lkNEfcoeunzYl7yo1bsnsCFkZIRw0ajWrkPYyU=; b=tErpfLW2ffYearM7r7C4fWb8v0eaWsynavFR1Pzau2PRpPXSoYzj4EU+zQUwe1hOIU yCdvEzTK4FpZVlCkuLmoGtKFMRkMG1WdiXhJKR0fxrmsPWflGhsWMxN26V1bNyA+57oX 7w5McoksyAYW95GcLFNloYwJ59L+dpo65EBAvnVzfLkPSV2tYymnTgzbmzFbJfq3Ubdi s23N/NNMcxGqLzhi6biAvl+OEvLh4tJFWuJWYD2L2HT0CHbRa09UO+jGL1DLsqSAtAB1 77+Uv76sxzVFKufdhaeOEHU+S35k87cDPiSypRvwI2q9jTbhMfFF/Lpu7KpzcMWgi8dQ z0iA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:sender:from:to:cc:subject:date:message-id :in-reply-to:references; bh=fShN4lkNEfcoeunzYl7yo1bsnsCFkZIRw0ajWrkPYyU=; b=nPE938QdV6guSfU5UWFvpEw32qC/wIfPrX0fuXOkVI8vkNcELy5xJfgkACGZ0ypD+6 BPriRVzovbvs3a7+gzIe+wlg3qYTN3IJqpTIcB49YpWCoEc+So4a3j5dt6SGX09lPdFM cjS+sFjg0Ih6ymc4+z+6za3+pDgpaeBSJi6YO/FUZTC51BmvXci//mOBmCc2ClxwqK88 etTMly/OZWSWaPUaCSRBZEa1SR3jME+WBL1a2ezqNYa/6DrLsSxjdVGTNqTa2AsrRrKd spEIAB94eZhmHKZvtqotEMyRAhLl4t9X+4+BGNDumMoKSXH53Jy8TYLErzgebzsS3y7d GyCw== X-Gm-Message-State: AFeK/H30Rvmjq4Gu3S13kQAI3Asxd+z15oMMwC2OxhVHmkBBX3dld9cLt9dyhHnnpdSJuA== X-Received: by 10.25.25.80 with SMTP id 77mr374675lfz.64.1490804516784; Wed, 29 Mar 2017 09:21:56 -0700 (PDT) Received: from xi.terra ([84.216.234.102]) by smtp.gmail.com with ESMTPSA id h23sm1372287lji.21.2017.03.29.09.21.53 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Wed, 29 Mar 2017 09:21:54 -0700 (PDT) Received: from johan by xi.terra with local (Exim 4.89) (envelope-from ) id 1ctGM1-0004jY-5u; Wed, 29 Mar 2017 18:21:49 +0200 From: Johan Hovold To: Lauro Ramos Venancio , Aloisio Almeida Jr , Samuel Ortiz Cc: linux-wireless@vger.kernel.org, netdev@vger.kernel.org, linux-kernel@vger.kernel.org, Johan Hovold , Vincent Cuissard Subject: [PATCH 6/7] NFC: nfcmrvl_uart: fix device-node leak during probe Date: Wed, 29 Mar 2017 18:21:11 +0200 Message-Id: <20170329162112.18121-7-johan@kernel.org> X-Mailer: git-send-email 2.12.2 In-Reply-To: <20170329162112.18121-1-johan@kernel.org> References: <20170329162112.18121-1-johan@kernel.org> Sender: linux-wireless-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-wireless@vger.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP Make sure to release the device-node reference when done parsing the node. Fixes: e097dc624f78 ("NFC: nfcmrvl: add UART driver") Cc: Vincent Cuissard Signed-off-by: Johan Hovold --- drivers/nfc/nfcmrvl/uart.c | 3 +++ 1 file changed, 3 insertions(+) diff --git a/drivers/nfc/nfcmrvl/uart.c b/drivers/nfc/nfcmrvl/uart.c index 6c0c301611c4..91162f8e0366 100644 --- a/drivers/nfc/nfcmrvl/uart.c +++ b/drivers/nfc/nfcmrvl/uart.c @@ -84,6 +84,7 @@ static int nfcmrvl_uart_parse_dt(struct device_node *node, ret = nfcmrvl_parse_dt(matched_node, pdata); if (ret < 0) { pr_err("Failed to get generic entries\n"); + of_node_put(matched_node); return ret; } @@ -97,6 +98,8 @@ static int nfcmrvl_uart_parse_dt(struct device_node *node, else pdata->break_control = 0; + of_node_put(matched_node); + return 0; }