]> git.ipfire.org Git - thirdparty/kernel/stable.git/commit
serial: pic32: free up irq names correctly
authorJiri Slaby <jslaby@suse.cz>
Tue, 3 May 2022 06:31:21 +0000 (08:31 +0200)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Wed, 17 Aug 2022 12:41:59 +0000 (14:41 +0200)
commit742295c7472dd077733b342111bb9b4f44727505
tree5fcdf25eb1502ee9a316cae8794f4e10989a4de4
parente38e4952ac7a316c9002af30980d6aa850214474
serial: pic32: free up irq names correctly

[ Upstream commit fe36fa18ca77ca3ca9f90aab6cf39031416e432b ]

struct pic32_sport contains built-up names for irqs. These are freed
only in error path of pic32_uart_startup(). And even there, the freeing
happens before free_irq().

So fix this by:
* moving frees after free_irq(), and
* add frees to pic32_uart_shutdown() -- the opposite of
  pic32_uart_startup().

Signed-off-by: Jiri Slaby <jslaby@suse.cz>
Link: https://lore.kernel.org/r/20220503063122.20957-11-jslaby@suse.cz
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Signed-off-by: Sasha Levin <sashal@kernel.org>
drivers/tty/serial/pic32_uart.c