From patchwork Thu Mar 30 10:15:40 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Johan Hovold X-Patchwork-Id: 9653607 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 A73FD60349 for ; Thu, 30 Mar 2017 10:21:12 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 91C752856A for ; Thu, 30 Mar 2017 10:21:12 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 86A7428583; Thu, 30 Mar 2017 10:21:12 +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 30B0A2856A for ; Thu, 30 Mar 2017 10:21:12 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S933354AbdC3KQN (ORCPT ); Thu, 30 Mar 2017 06:16:13 -0400 Received: from mail-lf0-f65.google.com ([209.85.215.65]:32886 "EHLO mail-lf0-f65.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S933197AbdC3KQF (ORCPT ); Thu, 30 Mar 2017 06:16:05 -0400 Received: by mail-lf0-f65.google.com with SMTP id r36so4146440lfi.0; Thu, 30 Mar 2017 03:16:04 -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=C2TpUtMARE+cj6OurmsRrGRbwISSirPzxZJAQybZiDtJgr0LkKslbGVoyVNp4IbLsv UXYKr/5MQb9Mx34cmxZJ9S7XmJzOrRUcVP2xAMPmLqXqiqL7HiexIKeNi5RMKmJxWbUY poWNRJg12jLa3QArJS4EWS9aH2AKx5EAf7iEcIQ4Z7C0XYM480RMOEbAxkIq3Yx39STg qc+Q7n2GRvIHX7dkiTwGH5RLpfnZegEUM5aJnMMWz/ehczq9Exb/dF6VgHOBGDABKewq Ru4lohPUG1VyJnvXnEZrM30FUynEz23U+t2OrNv+1g6N7pUAkuyIyxO+2kNOgQh2LFl4 84MQ== 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=G/SlnoZgyzfBBTcxSI13p4s+7X+rLIQmeJ1imfR0rhwd2hiWugpk1iUq1caFLKaxOh c81R9gPdTrpDPRUR7fbp7FpJlcUNejcjMR3OtCneEE5xPlPZP/QNilNie7pgt7AhRT/M tS8cSLPv6Hw5CliYSJFSVDH8Cnw6R29kY927MZjE/IOXW546j45sy6+2qF/cY2XDvMAe QY8swAq4SXN+NeSmMvx3MyrbWZ5/6Lb24XBSewPK6YdQchOKMKtjW5cMt21Cyr2PNErp 3KkaZfepAXQzEQwH/GTJFiVhqpsjdWpnaW0DM3fE6o9+BcE8/t/N9ri4eOH9Vqshe3Hu mdGA== X-Gm-Message-State: AFeK/H062wsJQJrFZqptCTRcv7sxrO6gqLQ+T+9DyhiVju5A6aEFj3LR4X6ZnTkebUXShw== X-Received: by 10.46.87.13 with SMTP id l13mr1837814ljb.85.1490868963305; Thu, 30 Mar 2017 03:16:03 -0700 (PDT) Received: from xi.terra ([84.216.234.102]) by smtp.gmail.com with ESMTPSA id z26sm296904lja.28.2017.03.30.03.16.00 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Thu, 30 Mar 2017 03:16:01 -0700 (PDT) Received: from johan by xi.terra with local (Exim 4.89) (envelope-from ) id 1ctX7R-00041Q-Ih; Thu, 30 Mar 2017 12:15:53 +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 v2 6/8] NFC: nfcmrvl_uart: fix device-node leak during probe Date: Thu, 30 Mar 2017 12:15:40 +0200 Message-Id: <20170330101542.15384-7-johan@kernel.org> X-Mailer: git-send-email 2.12.2 In-Reply-To: <20170330101542.15384-1-johan@kernel.org> References: <20170330101542.15384-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; }