Messages in this thread Patch in this message | | | Date | Sun, 25 Mar 2007 00:54:17 +0900 (JST) | Subject | [PATCH 1/2] [USB] [PL2303]: fixed to skip NULL entry in pl2303_shutdown. | From | Noriaki TAKAMIYA <> |
| |
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 - To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/
| |