msm: sdio: Check tty state before checking write bytes available

Before checking for how many bytes can be written, check the state of
terminal so as to handle the removal of the device during shutdown.

CRs-fixed: 302366
Signed-off-by: Krishna Konda <kkonda@codeaurora.org>
1 file changed