Skip to content

Commit a7ba7eb

Browse files
amboargregkh
authored andcommitted
soc: aspeed: lpc-snoop: Cleanup resources in stack-order
commit 8481d59 upstream. Free the kfifo after unregistering the miscdev in aspeed_lpc_disable_snoop() as the kfifo is initialised before the miscdev in aspeed_lpc_enable_snoop(). Fixes: 3772e5d ("drivers/misc: Aspeed LPC snoop output using misc chardev") Cc: [email protected] Cc: Jean Delvare <[email protected]> Acked-by: Jean Delvare <[email protected]> Link: https://patch.msgid.link/20250616-aspeed-lpc-snoop-fixes-v2-1-3cdd59c934d3@codeconstruct.com.au Signed-off-by: Andrew Jeffery <[email protected]> Signed-off-by: Greg Kroah-Hartman <[email protected]>
1 parent 9a1d3e8 commit a7ba7eb

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

drivers/soc/aspeed/aspeed-lpc-snoop.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -264,8 +264,8 @@ static void aspeed_lpc_disable_snoop(struct aspeed_lpc_snoop *lpc_snoop,
264264
return;
265265
}
266266

267-
kfifo_free(&lpc_snoop->chan[channel].fifo);
268267
misc_deregister(&lpc_snoop->chan[channel].miscdev);
268+
kfifo_free(&lpc_snoop->chan[channel].fifo);
269269
}
270270

271271
static int aspeed_lpc_snoop_probe(struct platform_device *pdev)

0 commit comments

Comments
 (0)