summaryrefslogtreecommitdiff
path: root/drivers/usb/serial
diff options
context:
space:
mode:
authorJohan Hovold <johan@kernel.org>2017-03-16 17:13:38 +0100
committerJohan Hovold <johan@kernel.org>2017-03-28 11:00:08 +0200
commit2f16621b9a06c1956eba57a23ff990bd24ceee82 (patch)
tree7b1f350ed4caa1bc48c7e3768a387fad6c626e14 /drivers/usb/serial
parentcac4cea513c7193512a58da4b1bfa46c04246546 (diff)
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: Johan Hovold <johan@kernel.org>
Diffstat (limited to 'drivers/usb/serial')
-rw-r--r--drivers/usb/serial/f81534.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/drivers/usb/serial/f81534.c b/drivers/usb/serial/f81534.c
index a4b1fea4453e..be106f4e3e57 100644
--- a/drivers/usb/serial/f81534.c
+++ b/drivers/usb/serial/f81534.c
@@ -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",