Skip to content

Commit

Permalink
USB: serial: f81534: abort probe on early errors
Browse files Browse the repository at this point in the history
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>
  • Loading branch information
Johan Hovold committed Mar 28, 2017
1 parent cac4cea commit 2f16621
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions drivers/usb/serial/f81534.c
Original file line number Diff line number Diff line change
Expand Up @@ -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;
}

/*
Expand All @@ -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,
Expand All @@ -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",
Expand Down

0 comments on commit 2f16621

Please sign in to comment.