staging: dgap: unwind on error in dgap_init_one()
authorDaeseok Youn <daeseok.youn@gmail.com>
Fri, 13 Jun 2014 09:23:15 +0000 (18:23 +0900)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Thu, 19 Jun 2014 22:23:32 +0000 (15:23 -0700)
commit91177d53a394a982735262428d2c876df0aaa38d
tree21dc1fe35abedda93991e04039df87e9aede53b6
parent3c3befef8f5269a23ad44dde0818dbf0b2b0d393
staging: dgap: unwind on error in dgap_init_one()

The dgap_init_one() needs to handle error properly
if one of functions in dgap_init_one() is failed.

Introduce some functions for handling error in dgap_init_one()
 - dgap_tty_unregister() : unregister tty driver
 - dgap_free_flipbuf() : free flip buffer
 - dgap_release_remap() : release memory region and unmapped memory.

Signed-off-by: Daeseok Youn <daeseok.youn@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/staging/dgap/dgap.c