diff options
| author | Krzysztof Kozlowski <krzysztof.kozlowski@oss.qualcomm.com> | 2025-12-24 13:44:58 +0100 |
|---|---|---|
| committer | Lee Jones <lee@kernel.org> | 2026-01-22 14:23:07 +0000 |
| commit | 7d60a2b8c23a7109f3048c6cee77cc9ffa832755 (patch) | |
| tree | f43dbe24ef557fe2b1db6fcd54590aecdc53fd7a /drivers/mfd | |
| parent | cd18e9af79ad17db88c0799197ed1fd948396388 (diff) | |
| download | linux-7d60a2b8c23a7109f3048c6cee77cc9ffa832755.tar.gz linux-7d60a2b8c23a7109f3048c6cee77cc9ffa832755.tar.bz2 linux-7d60a2b8c23a7109f3048c6cee77cc9ffa832755.zip | |
mfd: core: Simplify storing device_node in mfd_match_of_node_to_dev()
of_node_get() returns the same pointer it received and canonical form of
storing device_node is to use of_node_get() in the assignment.
Signed-off-by: Krzysztof Kozlowski <krzysztof.kozlowski@oss.qualcomm.com>
Link: https://patch.msgid.link/20251224124456.208529-4-krzysztof.kozlowski@oss.qualcomm.com
Signed-off-by: Lee Jones <lee@kernel.org>
Diffstat (limited to 'drivers/mfd')
| -rw-r--r-- | drivers/mfd/mfd-core.c | 3 |
1 files changed, 1 insertions, 2 deletions
diff --git a/drivers/mfd/mfd-core.c b/drivers/mfd/mfd-core.c index 68de2f741142..6be58eb5a746 100644 --- a/drivers/mfd/mfd-core.c +++ b/drivers/mfd/mfd-core.c @@ -130,11 +130,10 @@ allocate_of_node: return -ENOMEM; of_entry->dev = &pdev->dev; - of_entry->np = np; + of_entry->np = of_node_get(np); scoped_guard(mutex, &mfd_of_node_mutex) list_add_tail(&of_entry->list, &mfd_of_node_list); - of_node_get(np); device_set_node(&pdev->dev, of_fwnode_handle(np)); return 0; } |
