firewire: ohci: use return value from fw_node_get()
authorTakashi Sakamoto <o-takashi@sakamocchi.jp>
Mon, 8 Sep 2025 01:21:00 +0000 (10:21 +0900)
committerTakashi Sakamoto <o-takashi@sakamocchi.jp>
Mon, 8 Sep 2025 01:26:25 +0000 (10:26 +0900)
The programming pattern, referring after increasing reference count, is
supported by fw_node_get().

This commit simplify the programming pattern.

Link: https://lore.kernel.org/r/20250908012108.514698-4-o-takashi@sakamocchi.jp
Signed-off-by: Takashi Sakamoto <o-takashi@sakamocchi.jp>
drivers/firewire/core-card.c

index d128c7a..41902dc 100644 (file)
@@ -306,8 +306,7 @@ static void bm_work(struct work_struct *work)
 
        generation = card->generation;
 
-       root_node = card->root_node;
-       fw_node_get(root_node);
+       root_node = fw_node_get(card->root_node);
        root_device = root_node->data;
        root_device_is_running = root_device &&
                        atomic_read(&root_device->state) == FW_DEVICE_RUNNING;