CHROMIUM: USB: cdc-acm: fix possible null pointer in acm_tty_hangup

Sometimes, acm_tty_hangup and acm_tty_close are called concurrently.
This results in acm pointer being null in acm_tty_hangup and aborts when
it is dereferenced.

Signed-off-by: Vincent Palatin <vpalatin@chromium.org>

BUG=chrome-os-partner:5053
TEST=on Alex with YT3300 modem, connect to 3G network, then open/close
the lid to suspend/resume the machine and observe there is no kernel
panic.

Change-Id: I13ef1a6e75b9bcf3d92c268c7f4c0b2745ff9e42
Reviewed-on: http://gerrit.chromium.org/gerrit/4663
Tested-by: Vincent Palatin <vpalatin@chromium.org>
Reviewed-by: Benson Leung <bleung@chromium.org>
Reviewed-by: Puneet Kumar <puneetster@chromium.org>
1 file changed