Message ID | 20241024015909.58654-1-zhangzekun11@huawei.com (mailing list archive) |
---|---|
Headers | show |
Series | Get the device_node before calling of_find_node_by_name() | expand |
On Thu, 24 Oct 2024 09:59:07 +0800 Zhang Zekun wrote: > of_find_node_by_name() will decrease the refount of the device node. > Get the device_node before call to it. Doing some quick grepping I think Andrew is completely right. Most callers either get this wrong or call get() immediately prior. Maybe add a new helper with more suitable semantics? The goal is not to fix the bugs but to prevent them in the first place.