mirror of
https://github.com/AuxXxilium/linux_dsm_epyc7002.git
synced 2024-11-25 06:50:52 +07:00
gpu: ipu-v3: pre: fix device node leak in ipu_pre_lookup_by_phandle
Before returning, call of_node_put() for the device node returned by
of_parse_phandle().
Fixes: d2a3423258
("gpu: ipu-v3: add driver for Prefetch Resolve Engine")
Signed-off-by: Tobias Jordan <Tobias.Jordan@elektrobit.com>
Signed-off-by: Philipp Zabel <p.zabel@pengutronix.de>
This commit is contained in:
parent
6d36b7fec6
commit
c795f3052b
@ -129,11 +129,14 @@ ipu_pre_lookup_by_phandle(struct device *dev, const char *name, int index)
|
||||
if (pre_node == pre->dev->of_node) {
|
||||
mutex_unlock(&ipu_pre_list_mutex);
|
||||
device_link_add(dev, pre->dev, DL_FLAG_AUTOREMOVE);
|
||||
of_node_put(pre_node);
|
||||
return pre;
|
||||
}
|
||||
}
|
||||
mutex_unlock(&ipu_pre_list_mutex);
|
||||
|
||||
of_node_put(pre_node);
|
||||
|
||||
return NULL;
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user