msm: smd_tty: handle invalid device for open timeout
msm: smd_tty: handle invalid device for open timeout

If an invalid device is passed into the open timeout device attribute,
the code correctly identifies the error, but then proceeds to access an
array with the out-of-bounds index.

Return early with an error code in the case of an invalid device.

CRs-Fixed: 505197
Change-Id: I7a9bf906f2326d8ea627e2ab9310c95bfee98914
Signed-off-by: Eric Holmberg <5000aa55685d659e1f7f26ece526f9c7021ab484@codeaurora.org>

TeamVee-Kanas/android_kernel_samsung_kanas,TeamVee-Kanas/android_kernel_samsung_kanas,TeamVee-Kanas/android_kernel_samsung_kanas,TeamVee-Kanas/android_kernel_samsung_kanas,TeamVee-Kanas/android_kernel_samsung_kanas