projects
/
openwrt
/
staging
/
blogic.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
e00b8fd
)
Revert "staging: dgap: remove unneeded kfree() in dgap_tty_register_ports()"
author
Greg Kroah-Hartman
<
[email protected]
>
Thu, 29 May 2014 20:59:03 +0000
(13:59 -0700)
committer
Greg Kroah-Hartman
<
[email protected]
>
Thu, 29 May 2014 20:59:03 +0000
(13:59 -0700)
This reverts commit
0ade4a34fd439d62df46937e8f3e584eb0879579
as it was
wrong.
Cc: Dan Carpenter <
[email protected]
>
Cc: Daeseok Youn <
[email protected]
>
Signed-off-by: Greg Kroah-Hartman <
[email protected]
>
drivers/staging/dgap/dgap.c
patch
|
blob
|
history
diff --git
a/drivers/staging/dgap/dgap.c
b/drivers/staging/dgap/dgap.c
index 48c13c9497249f2898687c9f4bcae0ec54156b8a..170d6f3e42218214bf869e15163d253aa4c98a82 100644
(file)
--- a/
drivers/staging/dgap/dgap.c
+++ b/
drivers/staging/dgap/dgap.c
@@
-4145,8
+4145,10
@@
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)
+ if (!brd->printer_ports) {
+ kfree(brd->serial_ports);
return -ENOMEM;
+ }
for (i = 0; i < brd->nasync; i++) {
tty_port_init(&brd->serial_ports[i]);