diff options
author | Greg Kroah-Hartman | 2014-05-29 22:59:03 +0200 |
---|---|---|
committer | Greg Kroah-Hartman | 2014-05-29 22:59:03 +0200 |
commit | aec46bbdeab172a2129ef4e64051e706cbe9ec56 (patch) | |
tree | d6fc09464fa4f89311ceeb57c112d63b46d5674f /drivers/staging/dgap | |
parent | Staging: rtl8192u: r8192U_wx.c Fixed a misplaced brace (diff) | |
download | kernel-qcow2-linux-aec46bbdeab172a2129ef4e64051e706cbe9ec56.tar.gz kernel-qcow2-linux-aec46bbdeab172a2129ef4e64051e706cbe9ec56.tar.xz kernel-qcow2-linux-aec46bbdeab172a2129ef4e64051e706cbe9ec56.zip |
Revert "staging: dgap: remove unneeded kfree() in dgap_tty_register_ports()"
This reverts commit 0ade4a34fd439d62df46937e8f3e584eb0879579 as it was
wrong.
Cc: Dan Carpenter <dan.carpenter@oracle.com>
Cc: Daeseok Youn <daeseok.youn@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Diffstat (limited to 'drivers/staging/dgap')
-rw-r--r-- | drivers/staging/dgap/dgap.c | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/drivers/staging/dgap/dgap.c b/drivers/staging/dgap/dgap.c index 48c13c949724..170d6f3e4221 100644 --- 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]); |