diff --git a/drivers/net/usb/hso.c b/drivers/net/usb/hso.c index bed8fcedff49a98168ac7afb00a152b51b0d7038..6d83812603b6b92fe02c2d06f43956a6a24df050 100644 --- a/drivers/net/usb/hso.c +++ b/drivers/net/usb/hso.c @@ -2628,15 +2628,15 @@ static struct hso_device *hso_create_net_device(struct usb_interface *interface, static void hso_free_tiomget(struct hso_serial *serial) { - struct hso_tiocmget *tiocmget = serial->tiocmget; + struct hso_tiocmget *tiocmget; + if (!serial) + return; + tiocmget = serial->tiocmget; if (tiocmget) { - if (tiocmget->urb) { - usb_free_urb(tiocmget->urb); - tiocmget->urb = NULL; - } + usb_free_urb(tiocmget->urb); + tiocmget->urb = NULL; serial->tiocmget = NULL; kfree(tiocmget); - } }