From: Daeseok Youn Date: Mon, 19 May 2014 09:56:34 +0000 (+0900) Subject: staging: dgap: implement error handling in dgap_tty_register() X-Git-Tag: omap-for-v3.16/fixes-against-rc1~39^2~36^2~358 X-Git-Url: http://git.openpandora.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=9140fcd655541fee5655701df05ab0b06653c24c;p=pandora-kernel.git 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: Daeseok Youn Reviewed-by: Dan Carpenter Signed-off-by: Greg Kroah-Hartman --- Reading git-diff-tree failed