Skip to content

Commit

Permalink
NFC: nfcmrvl_uart: fix device-node leak during probe
Browse files Browse the repository at this point in the history
Make sure to release the device-node reference when done parsing the
node.

Fixes: e097dc6 ("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>
  • Loading branch information
Johan Hovold authored and Samuel Ortiz committed Jun 18, 2017
1 parent 45dd39b commit d0607aa
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions drivers/nfc/nfcmrvl/uart.c
Original file line number Diff line number Diff line change
Expand Up @@ -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;
}

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

Expand Down

0 comments on commit d0607aa

Please sign in to comment.