NFC: nfcmrvl_uart: fix device-node leak during probe

Make sure to release the device-node reference when done parsing the
node.

Fixes: e097dc624f ("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>
This commit is contained in:
Johan Hovold 2017-03-30 12:15:40 +02:00 committed by Samuel Ortiz
parent 45dd39b974
commit d0607aa4ae
1 changed files with 3 additions and 0 deletions

View File

@ -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;
}