Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Skip to content
Commit 9140fcd6 authored by Daeseok Youn's avatar Daeseok Youn Committed by Greg Kroah-Hartman
Browse files

staging: dgap: implement error handling in dgap_tty_register()



- alloc_tty_driver() is deprecated so it is changed to
tty_alloc_driver()
- Pointers which are allocated by alloc_tty_driver() and kzalloc()
can be NULL so it need to check NULL for them.
- If one of those is failed, it need to add proper handler for
avoiding memory leak.
- If both of drivers are registered normally, and
then set TRUE to dgap_major_serial{print}_registered. If one
of drivers is failed to register, leave a default value as
FALSE.

Signed-off-by: default avatarDaeseok Youn <daeseok.youn@gmail.com>
Reviewed-by: default avatarDan Carpenter <dan.carpenter@oracle.com>
Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@linuxfoundation.org>
parent 02d9b1eb
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment