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>
Thu, 5 May 2022 20:39:19 +0000 (22:39 +0200)
commitfe36fa18ca77ca3ca9f90aab6cf39031416e432b
treee9eb2d48ee5e8bb40c138053bc3b46d06e615a7d
parent28dc563339b181461494918d5d155e3ebc9a87ec
serial: pic32: free up irq names correctly

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>
drivers/tty/serial/pic32_uart.c