Hi,

  While booting, this entry is set to NULL in destroy_serial(),
  but serial->port is referred again in pl2303_shutdown() via
  serial->type->shutdown.
---
 drivers/usb/serial/pl2303.c |    2 ++
 1 files changed, 2 insertions(+), 0 deletions(-)

diff --git a/drivers/usb/serial/pl2303.c b/drivers/usb/serial/pl2303.c
index 83dfae9..d631f8c 100644
--- a/drivers/usb/serial/pl2303.c
+++ b/drivers/usb/serial/pl2303.c
@@ -905,6 +905,8 @@ static void pl2303_shutdown(struct usb_s
        dbg("%s", __FUNCTION__);
 
        for (i = 0; i < serial->num_ports; ++i) {
+               if (!serial->port[i])
+                       continue;
                priv = usb_get_serial_port_data(serial->port[i]);
                if (priv) {
                        pl2303_buf_free(priv->buf);
-- 
1.4.4

--
Noriaki TAKAMIYA

-------------------------------------------------------------------------
Take Surveys. Earn Cash. Influence the Future of IT
Join SourceForge.net's Techsay panel and you'll get the chance to share your
opinions on IT & business topics through brief surveys-and earn cash
http://www.techsay.com/default.php?page=join.php&p=sourceforge&CID=DEVDEV
_______________________________________________
linux-usb-devel@lists.sourceforge.net
To unsubscribe, use the last form field at:
https://lists.sourceforge.net/lists/listinfo/linux-usb-devel

Reply via email to