Skip to content

Commit

Permalink
USB: cdc-acm: do not log successful probe on later errors
Browse files Browse the repository at this point in the history
Do not log the successful-probe message until the tty device has been
registered.

Signed-off-by: Johan Hovold <johan@kernel.org>
Link: https://lore.kernel.org/r/20210322155318.9837-9-johan@kernel.org
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
  • Loading branch information
Johan Hovold authored and Greg Kroah-Hartman committed Mar 23, 2021
1 parent 0b2b23c commit 7957941
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions drivers/usb/class/cdc-acm.c
Original file line number Diff line number Diff line change
Expand Up @@ -1486,8 +1486,6 @@ static int acm_probe(struct usb_interface *intf,
acm->nb_index = 0;
acm->nb_size = 0;

dev_info(&intf->dev, "ttyACM%d: USB ACM device\n", minor);

acm->line.dwDTERate = cpu_to_le32(9600);
acm->line.bDataBits = 8;
acm_set_line(acm, &acm->line);
Expand All @@ -1510,6 +1508,8 @@ static int acm_probe(struct usb_interface *intf,
usb_clear_halt(usb_dev, acm->out);
}

dev_info(&intf->dev, "ttyACM%d: USB ACM device\n", minor);

return 0;

err_release_data_interface:
Expand Down

0 comments on commit 7957941

Please sign in to comment.