Skip to content

Commit 8481d59

Browse files
committed
soc: aspeed: lpc-snoop: Cleanup resources in stack-order
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]>
1 parent 19272b3 commit 8481d59

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
@@ -263,8 +263,8 @@ static void aspeed_lpc_disable_snoop(struct aspeed_lpc_snoop *lpc_snoop,
263263
return;
264264
}
265265

266-
kfifo_free(&lpc_snoop->chan[channel].fifo);
267266
misc_deregister(&lpc_snoop->chan[channel].miscdev);
267+
kfifo_free(&lpc_snoop->chan[channel].fifo);
268268
}
269269

270270
static int aspeed_lpc_snoop_probe(struct platform_device *pdev)

0 commit comments

Comments
 (0)