Commit 2f16621b authored by Johan Hovold's avatar Johan Hovold

USB: serial: f81534: abort probe on early errors

We can now abort probe early after an error in calc_num_ports by
returning an errno instead of attempting to continue probing but not
register any ports.
Signed-off-by: default avatarJohan Hovold <johan@kernel.org>
parent cac4cea5
......@@ -634,7 +634,7 @@ static int f81534_calc_num_ports(struct usb_serial *serial,
if (status) {
dev_err(&serial->interface->dev, "%s: find idx failed: %d\n",
__func__, status);
return 0;
return status;
}
/*
......@@ -650,7 +650,7 @@ static int f81534_calc_num_ports(struct usb_serial *serial,
dev_err(&serial->interface->dev,
"%s: get custom data failed: %d\n",
__func__, status);
return 0;
return status;
}
dev_dbg(&serial->interface->dev,
......@@ -666,7 +666,7 @@ static int f81534_calc_num_ports(struct usb_serial *serial,
dev_err(&serial->interface->dev,
"%s: read failed: %d\n", __func__,
status);
return 0;
return status;
}
dev_dbg(&serial->interface->dev, "%s: read default config\n",
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment