summaryrefslogtreecommitdiffstats
path: root/drivers/nfc
diff options
context:
space:
mode:
authorJohan Hovold <johan@kernel.org>2017-03-30 12:15:40 +0200
committerSamuel Ortiz <sameo@linux.intel.com>2017-06-18 23:57:59 +0200
commitd0607aa4aee88cb097b694caa619e68f1e0a39c6 (patch)
tree5e32a978819074823f530f7e48ae14c2f9c72bd0 /drivers/nfc
parent45dd39b974f6632222dd5cdcbea7358a077ab0b0 (diff)
downloadop-kernel-dev-d0607aa4aee88cb097b694caa619e68f1e0a39c6.zip
op-kernel-dev-d0607aa4aee88cb097b694caa619e68f1e0a39c6.tar.gz
NFC: nfcmrvl_uart: fix device-node leak during probe
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> Signed-off-by: Samuel Ortiz <sameo@linux.intel.com>
Diffstat (limited to 'drivers/nfc')
-rw-r--r--drivers/nfc/nfcmrvl/uart.c3
1 files changed, 3 insertions, 0 deletions
diff --git a/drivers/nfc/nfcmrvl/uart.c b/drivers/nfc/nfcmrvl/uart.c
index 6c0c301..91162f8 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;
}
OpenPOWER on IntegriCloud