fix "Update function that was depecrecated from kernel v3.7"
The initial implementation for this was wrong. Fix return checks for tty_alloc_driver() by using IS_ERR() and PRT_ERR() macros.
Also initialize the tty flags when allocating the driver as this may have an impact on the initialization of the driver.