Commit d0607aa4 authored by Johan Hovold's avatar Johan Hovold Committed by Samuel Ortiz

NFC: nfcmrvl_uart: fix device-node leak during probe

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

Fixes: e097dc62 ("NFC: nfcmrvl: add UART driver")
Cc: Vincent Cuissard <cuissard@marvell.com>
Signed-off-by: default avatarJohan Hovold <johan@kernel.org>
Signed-off-by: default avatarSamuel Ortiz <sameo@linux.intel.com>
parent 45dd39b9
...@@ -84,6 +84,7 @@ static int nfcmrvl_uart_parse_dt(struct device_node *node, ...@@ -84,6 +84,7 @@ static int nfcmrvl_uart_parse_dt(struct device_node *node,
ret = nfcmrvl_parse_dt(matched_node, pdata); ret = nfcmrvl_parse_dt(matched_node, pdata);
if (ret < 0) { if (ret < 0) {
pr_err("Failed to get generic entries\n"); pr_err("Failed to get generic entries\n");
of_node_put(matched_node);
return ret; return ret;
} }
...@@ -97,6 +98,8 @@ static int nfcmrvl_uart_parse_dt(struct device_node *node, ...@@ -97,6 +98,8 @@ static int nfcmrvl_uart_parse_dt(struct device_node *node,
else else
pdata->break_control = 0; pdata->break_control = 0;
of_node_put(matched_node);
return 0; return 0;
} }
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment