driver: tty: add missing unregister in err case
PATCH 1/1 driver: tty: add missing unregister in err case
when platform_driver_register broken, we should unregister ucc_uart_driver
Signed-off-by Libo chen <[email protected]>
--- drivers/tty/serial/ucc_uart.c | 4 +++- 1 files changed, 3 insertions(+), 1 deletions(-)
drivers/tty/serial/ucc_uart.c +3 -1
@@ -1518,9 +1518,11 @@ static int __init ucc_uart_init(void) } ret =platform_driver_register (&ucc_uart_of_driver); -if (ret) +if (ret) {printk (KERN_ERR "ucc-uart: could not register platform driver\n" ); +uart_unregister_driver (&ucc_uart_driver); + }return ret; }
Signature · 1 line
1.7.1
Quoted 3 lines · Libo Chen
when
platform_driver_registerbroken, we should unregisterucc_uart_driverSigned-off-by Libo chen<[email protected]>
Acked-by Timur Tabi <[email protected]>
Thanks for catching this.
Signature · 1 line
Timur Tabi