Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > linux.kernel > #1612135
| From | Johan Hovold <johan@kernel.org> |
|---|---|
| Newsgroups | linux.kernel |
| Subject | [PATCH 6/7] NFC: nfcmrvl_uart: fix device-node leak during probe |
| Date | 2017-03-29 18:30 +0200 |
| Message-ID | <tqoDV-ZD-33@gated-at.bofh.it> (permalink) |
| References | <tqoDU-ZD-3@gated-at.bofh.it> |
| Organization | linux.* mail to news gateway |
Make sure to release the device-node reference when done parsing the
node.
Fixes: e097dc624f78 ("NFC: nfcmrvl: add UART driver")
Cc: Vincent Cuissard <cuissard@marvell.com>
Signed-off-by: Johan Hovold <johan@kernel.org>
---
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;
}
--
2.12.2
Back to linux.kernel | Previous | Next — Previous in thread | Find similar | Unroll thread
[PATCH 0/7] NFC: fix device allocation and nfcmrvl crashes Johan Hovold <johan@kernel.org> - 2017-03-29 18:30 +0200
[PATCH 3/7] NFC: nfcmrvl: do not use device-managed resources Johan Hovold <johan@kernel.org> - 2017-03-29 18:30 +0200
Re: [PATCH 3/7] NFC: nfcmrvl: do not use device-managed resources Johan Hovold <johan@kernel.org> - 2017-03-29 22:50 +0200
[PATCH 4/7] NFC: nfcmrvl: use nfc-device for firmware download Johan Hovold <johan@kernel.org> - 2017-03-29 18:30 +0200
[PATCH 5/7] NFC: nfcmrvl: fix firmware-management initialisation Johan Hovold <johan@kernel.org> - 2017-03-29 18:30 +0200
[PATCH 7/7] NFC: nfcmrvl_usb: use interface as phy device Johan Hovold <johan@kernel.org> - 2017-03-29 18:30 +0200
[PATCH 2/7] NFC: nfcmrvl_uart: add missing tty-device sanity check Johan Hovold <johan@kernel.org> - 2017-03-29 18:30 +0200
[PATCH 1/7] NFC: fix broken device allocation Johan Hovold <johan@kernel.org> - 2017-03-29 18:30 +0200
[PATCH 6/7] NFC: nfcmrvl_uart: fix device-node leak during probe Johan Hovold <johan@kernel.org> - 2017-03-29 18:30 +0200
csiph-web