OSDN Git Service
(root)
/
android-x86
/
kernel.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
462310f
)
staging: dgap: remove unneeded kfree() in dgap_tty_register_ports()
author
Daeseok Youn
<daeseok.youn@gmail.com>
Mon, 26 May 2014 10:24:17 +0000
(19:24 +0900)
committer
Greg Kroah-Hartman
<gregkh@linuxfoundation.org>
Mon, 26 May 2014 17:35:24 +0000
(10:35 -0700)
When it failed to allocate for printer_ports, serial_ports
can be freed in dgap_tty_uninit().
Signed-off-by: Daeseok Youn <daeseok.youn@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/staging/dgap/dgap.c
patch
|
blob
|
history
diff --git
a/drivers/staging/dgap/dgap.c
b/drivers/staging/dgap/dgap.c
index
60b7d70
..
06abb20
100644
(file)
--- a/
drivers/staging/dgap/dgap.c
+++ b/
drivers/staging/dgap/dgap.c
@@
-4147,10
+4147,9
@@
static int dgap_tty_register_ports(struct board_t *brd)
brd->printer_ports = kcalloc(brd->nasync, sizeof(*brd->printer_ports),
GFP_KERNEL);
- if (brd->printer_ports == NULL) {
- kfree(brd->serial_ports);
+ if (brd->printer_ports == NULL)
return -ENOMEM;
- }
+
for (i = 0; i < brd->nasync; i++)
tty_port_init(&brd->printer_ports[i]);