Skip to content

Commit

Permalink
ctl: Always return errno values from ctl_port_register
Browse files Browse the repository at this point in the history
Return EBUSY instead of a bare 1 if a port number is already active.

Sponsored by:	Chelsio Communications
Differential Revision:	https://reviews.freebsd.org/D42929
  • Loading branch information
bsdjhb committed Mar 13, 2024
2 parents 40daddc + e03e77b commit 27a0f7c
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion sys/cam/ctl/ctl_frontend.c
Original file line number Diff line number Diff line change
Expand Up @@ -162,7 +162,7 @@ ctl_port_register(struct ctl_port *port)
if ((port_num < 0) ||
(ctl_set_mask(softc->ctl_port_mask, port_num) < 0)) {
mtx_unlock(&softc->ctl_lock);
return (1);
return (EBUSY);
}
softc->num_ports++;
mtx_unlock(&softc->ctl_lock);
Expand Down

0 comments on commit 27a0f7c

Please sign in to comment.