Skip to contentSkip to conversation

floppy: add missing put_device()

PATCH In review [email protected] 2 participants 2 messages Jul 18, 2023 1 message not in the archive SPARC + UltraSPARC (sparc/sparc64)

lore
Share & tools
lore

A message that is not in the archive (sent off-list or not yet received): [email protected]

#1 lore raw

PATCH 1/1 floppy: add missing put_device()

The of_find_device_by_node() takes a reference to the underlying device structure, we should release that reference.

./arch/sparc/include/asm/floppy_64.h:562:1-22: WARNING: Function "for_each_node_by_name" should have of_node_put() before break around line 567.

---
 arch/sparc/include/asm/floppy_64.h | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
arch/sparc/include/asm/floppy_64.h +1 -1
index 53e77c0974f9..619255e8c9ac 100644
@@ -594,7 +594,7 @@ static unsigned long __init sun_floppy_init(void)
         if (state_prop && !strncmp(state_prop, "disabled", 8)) {
             put_device(&op->dev);
             return 0;
-        }
+        }
 
         FLOPPY_IRQ = op->archdata.irqs[0];
#2 lore raw

Hi Ran Sun,

Quoted 18 lines · On Tue, Jul 18, 2023 at 05:02:54PM +0800, [email protected] wrote:

The of_find_device_by_node() takes a reference to the underlying device structure, we should release that reference.

./arch/sparc/include/asm/floppy_64.h:562:1-22: WARNING: Function "for_each_node_by_name" should have of_node_put() before break around line 567.

---
 arch/sparc/include/asm/floppy_64.h | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
arch/sparc/include/asm/floppy_64.h +0 -0
index 53e77c0974f9..619255e8c9ac 100644

arch/sparc/include/asm/floppy_64.h static unsigned long __init sun_floppy_init(void) · line 599

Quoted 7 lines
arch/sparc/include/asm/floppy_64.h +1 -1
@@ -594,7 +594,7 @@ static unsigned long __init sun_floppy_init(void)
         if (state_prop && !strncmp(state_prop, "disabled", 8)) {
             put_device(&op->dev);
             return 0;
-        }
+        }
 
         FLOPPY_IRQ = op->archdata.irqs[0];

The patch does not include any changes. Please redo.

Sam