mct_u232: Fix use of uninitialized pointer in mct_u323_startup()

My backport of commit 4e9a0b0525 "USB: mct_u232: add sanity checking in
probe" incorrectly added a dev_err() call using port->dev before 'port' was
initialised.  Use the 'serial' parameter to look up the device instead.

Signed-off-by: Ben Hutchings <ben@decadent.org.uk>
This commit is contained in:
Ben Hutchings
2017-11-06 02:50:25 +00:00
parent a481b9a8b1
commit 5df98fd0a5

View File

@ -449,7 +449,7 @@ static int mct_u232_startup(struct usb_serial *serial)
/* check first to simplify error handling */
if (!serial->port[1] || !serial->port[1]->interrupt_in_urb) {
dev_err(&port->dev, "expected endpoint missing\n");
dev_err(&serial->dev->dev, "expected endpoint missing\n");
return -ENODEV;
}