Commit 8737e167 authored by Rob Herring (Arm)'s avatar Rob Herring (Arm) Committed by Nishanth Menon

soc: ti: knav: Drop unnecessary check for property presence

of_property_read_u32() returns -EINVAL if a property is not present, so
the preceding check for presence with of_get_property() can be
dropped.

This is part of a larger effort to remove callers of of_get_property()
and similar functions. of_get_property() leaks the DT struct property
and data pointers which is a problem for dynamically allocated nodes
which may be freed.
Signed-off-by: default avatarRob Herring (Arm) <robh@kernel.org>
Link: https://lore.kernel.org/r/20240731201407.1838385-2-robh@kernel.orgSigned-off-by: default avatarNishanth Menon <nm@ti.com>
parent d9483b44
......@@ -1104,11 +1104,6 @@ static int knav_queue_setup_regions(struct knav_device *kdev,
continue;
}
if (!of_get_property(child, "link-index", NULL)) {
dev_err(dev, "No link info for %s\n", region->name);
devm_kfree(dev, region);
continue;
}
ret = of_property_read_u32(child, "link-index",
&region->link_index);
if (ret) {
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment