mirror of
https://git.FreeBSD.org/src.git
synced 2024-10-19 02:29:40 +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 New Issue
Block a user