提交 d0607aa4 编写于 作者: J Johan Hovold 提交者: 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: NJohan Hovold <johan@kernel.org>
Signed-off-by: NSamuel Ortiz <sameo@linux.intel.com>
上级 45dd39b9
......@@ -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;
}
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册