forked from luck/tmp_suning_uos_patched
firmware: arm_scmi: fix of_node leak in scmi_mailbox_check
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: aa4f886f38
("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>
This commit is contained in:
parent
9e98c678c2
commit
fa7fe29a64
|
@ -654,9 +654,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)
|
||||
|
|
Loading…
Reference in New Issue
Block a user