usb: usb_wwan: resume/suspend can be called after port is gone
authorBjørn Mork <bjorn@mork.no>
Thu, 26 Jul 2012 23:11:43 +0000 (01:11 +0200)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Fri, 10 Aug 2012 18:51:43 +0000 (11:51 -0700)
commit032129cb03df196c4216a82295e6555539da4ce7
tree8a48ac257883a949d4b953e5cdbc139bfb7684b0
parentd5fd650cfc7ffeca4af0da939293c8e7a5aa7c36
usb: usb_wwan: resume/suspend can be called after port is gone

We cannot unconditionally access any usb-serial port specific
data from the interface driver.  Both supending and resuming
may happen after the port has been removed and portdata is
freed.

Treat ports with no portdata as closed ports to avoid a NULL
pointer dereference on resume.  No need to kill URBs for
removed ports on suspend, avoiding the same NULL pointer
reference there.

Signed-off-by: Bjørn Mork <bjorn@mork.no>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/usb/serial/usb_wwan.c