]> www.infradead.org Git - users/jedix/linux-maple.git/commit
firmware: microchip: use scope-based cleanup where possible
authorConor Dooley <conor.dooley@microchip.com>
Wed, 10 Apr 2024 11:58:08 +0000 (12:58 +0100)
committerConor Dooley <conor.dooley@microchip.com>
Wed, 5 Jun 2024 18:36:17 +0000 (19:36 +0100)
commitd930eb4fdfee32e0a3e9a5c9c2af8d65857ac4de
tree68738b254b78e08a35e942496ad0c12ab7f927ac
parente277026b5e2dc30323115ffca0916f1b7d217906
firmware: microchip: use scope-based cleanup where possible

There's a bunch of structs created and freed every time the mailbox is
used. Move them to use the scope-based cleanup infrastructure to avoid
manually tearing them down. mpfs_auto_update_available() didn't free the
memory that it used (albeit it allocated exactly once during probe) so
that gets moved over too.

Signed-off-by: Conor Dooley <conor.dooley@microchip.com>
drivers/firmware/microchip/mpfs-auto-update.c