mirror of
https://github.com/freebsd/freebsd-src
synced 2024-07-22 02:37:15 +00:00
ctl: Always return errno values from ctl_port_register
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
This commit is contained in:
parent
30ce26cacf
commit
e03e77ba4d
|
@ -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);
|
||||
|
|
Loading…
Reference in a new issue