diff options
author | Steven Price <steven.price@arm.com> | 2019-03-25 17:37:22 +0000 |
---|---|---|
committer | Greg Kroah-Hartman <gregkh@linuxfoundation.org> | 2020-01-27 14:50:38 +0100 |
commit | 7851256f4d6b50807960c2f6681641a90ca7d66a (patch) | |
tree | 2350b32fd42f66d0222c4cfd3b6ffa1bf10094a3 /drivers/firmware | |
parent | d35156d1d87f9279d85e1a8fd3e4989c88b5e51a (diff) | |
download | linux-rt-7851256f4d6b50807960c2f6681641a90ca7d66a.tar.gz |
firmware: arm_scmi: fix of_node leak in scmi_mailbox_check
[ Upstream commit fa7fe29a645b4da08efe8ff2392898b88f9ded9f ]
of_parse_phandle_with_args() requires the caller to call of_node_put() on
the returned args->np pointer. Otherwise the reference count will remain
incremented.
However, in this case, since we don't actually use the returned pointer,
we can simply pass in NULL.
Fixes: aa4f886f3893f ("firmware: arm_scmi: add basic driver infrastructure for SCMI")
Signed-off-by: Steven Price <steven.price@arm.com>
Signed-off-by: Sudeep Holla <sudeep.holla@arm.com>
Signed-off-by: Sasha Levin <sashal@kernel.org>
Diffstat (limited to 'drivers/firmware')
-rw-r--r-- | drivers/firmware/arm_scmi/driver.c | 4 |
1 files changed, 1 insertions, 3 deletions
diff --git a/drivers/firmware/arm_scmi/driver.c b/drivers/firmware/arm_scmi/driver.c index 09119e3f5c01..effc4c17e0fb 100644 --- a/drivers/firmware/arm_scmi/driver.c +++ b/drivers/firmware/arm_scmi/driver.c @@ -662,9 +662,7 @@ static int scmi_xfer_info_init(struct scmi_info *sinfo) static int scmi_mailbox_check(struct device_node *np) { - struct of_phandle_args arg; - - return of_parse_phandle_with_args(np, "mboxes", "#mbox-cells", 0, &arg); + return of_parse_phandle_with_args(np, "mboxes", "#mbox-cells", 0, NULL); } static int scmi_mbox_free_channel(int id, void *p, void *data) |