diff options
| author | Wei Yongjun <yongjun_wei@trendmicro.com.cn> | 2013-05-29 01:47:09 -0400 |
|---|---|---|
| committer | Greg Kroah-Hartman <gregkh@linuxfoundation.org> | 2013-06-03 13:30:43 -0400 |
| commit | 147275983e42e07f4c9f3764a91ff65be026aea9 (patch) | |
| tree | f4bff42d51e1b5d7e87a3041c7981cabb5e6f79a | |
| parent | 86b40567b9178d2de8bbc08b04c98c8373ddf194 (diff) | |
serial: samsung: missing uart_unregister_driver() on error in s3c24xx_serial_modinit()
Add the missing uart_unregister_driver() before return from
s3c24xx_serial_modinit() in the error handling case.
Signed-off-by: Wei Yongjun <yongjun_wei@trendmicro.com.cn>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
| -rw-r--r-- | drivers/tty/serial/samsung.c | 8 |
1 files changed, 7 insertions, 1 deletions
diff --git a/drivers/tty/serial/samsung.c b/drivers/tty/serial/samsung.c index 89429410a245..1c2b8c31fde1 100644 --- a/drivers/tty/serial/samsung.c +++ b/drivers/tty/serial/samsung.c | |||
| @@ -1798,7 +1798,13 @@ static int __init s3c24xx_serial_modinit(void) | |||
| 1798 | return ret; | 1798 | return ret; |
| 1799 | } | 1799 | } |
| 1800 | 1800 | ||
| 1801 | return platform_driver_register(&samsung_serial_driver); | 1801 | ret = platform_driver_register(&samsung_serial_driver); |
| 1802 | if (ret < 0) { | ||
| 1803 | pr_err("Failed to register platform driver\n"); | ||
| 1804 | uart_unregister_driver(&s3c24xx_uart_drv); | ||
| 1805 | } | ||
| 1806 | |||
| 1807 | return ret; | ||
| 1802 | } | 1808 | } |
| 1803 | 1809 | ||
| 1804 | static void __exit s3c24xx_serial_modexit(void) | 1810 | static void __exit s3c24xx_serial_modexit(void) |
