lkml.org 
[lkml]   [2023]   [Jul]   [14]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
Patch in this message
/
Date
From
Subject[PATCH] floppy:ERROR: missing put_device; call of_find_device_by_node on line 589, but without a corresponding object release within this function. Add the put_device function before return to release memory
Signed-off-by: LiuBin <liubin001@208suo.com>
---
arch/sparc/include/asm/floppy_64.h | 1 +
1 file changed, 1 insertion(+)

diff --git a/arch/sparc/include/asm/floppy_64.h
b/arch/sparc/include/asm/floppy_64.h
index 070c8c1f5c8f..c4c51f494f25 100644
--- a/arch/sparc/include/asm/floppy_64.h
+++ b/arch/sparc/include/asm/floppy_64.h
@@ -588,6 +588,7 @@ static unsigned long __init sun_floppy_init(void)

op = of_find_device_by_node(dp);
if (!op)
+ put_device(op);
return 0;

state_prop = of_get_property(op->dev.of_node, "status", NULL);
\
 
 \ /
  Last update: 2023-07-16 20:47    [W:0.037 / U:0.680 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site