projects
/
platform
/
kernel
/
linux-rpi.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
bdbd0a7
)
tty: serial_core: fix error code returned by uart_register_driver()
author
Sergey Organov
<sorganov@gmail.com>
Tue, 23 Apr 2019 05:06:58 +0000
(08:06 +0300)
committer
Greg Kroah-Hartman
<gregkh@linuxfoundation.org>
Thu, 25 Apr 2019 09:39:51 +0000
(11:39 +0200)
uart_register_driver() returned -ENOMEM on any error, even when
tty_register_driver() call returned another one, such as -EBUSY.
Signed-off-by: Sergey Organov <sorganov@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/tty/serial/serial_core.c
patch
|
blob
|
history
diff --git
a/drivers/tty/serial/serial_core.c
b/drivers/tty/serial/serial_core.c
index
0decb0b
..
83f4dd0
100644
(file)
--- a/
drivers/tty/serial/serial_core.c
+++ b/
drivers/tty/serial/serial_core.c
@@
-2507,7
+2507,7
@@
static const struct tty_port_operations uart_port_ops = {
int uart_register_driver(struct uart_driver *drv)
{
struct tty_driver *normal;
- int i, retval;
+ int i, retval
= -ENOMEM
;
BUG_ON(drv->state);
@@
-2559,7
+2559,7
@@
int uart_register_driver(struct uart_driver *drv)
out_kfree:
kfree(drv->state);
out:
- return
-ENOMEM
;
+ return
retval
;
}
/**