diff options
author | Samuel Thibault <samuel.thibault@ens-lyon.org> | 2023-01-01 13:20:53 +0100 |
---|---|---|
committer | Samuel Thibault <samuel.thibault@ens-lyon.org> | 2023-01-01 13:20:53 +0100 |
commit | 1589f5fbe8fd87858d1a06517db5a7baae918f4f (patch) | |
tree | cb78afc11c0ced7fab36d3bb1195bb7d06f95e81 /libmachdev/ds_routines.c | |
parent | ec31a6b9578148086fa6c698ea75230468b52e4c (diff) | |
download | hurd-1589f5fbe8fd87858d1a06517db5a7baae918f4f.tar.gz hurd-1589f5fbe8fd87858d1a06517db5a7baae918f4f.tar.bz2 hurd-1589f5fbe8fd87858d1a06517db5a7baae918f4f.zip |
Do not ignore value returned by get_privileged_ports
Diffstat (limited to 'libmachdev/ds_routines.c')
-rw-r--r-- | libmachdev/ds_routines.c | 8 |
1 files changed, 5 insertions, 3 deletions
diff --git a/libmachdev/ds_routines.c b/libmachdev/ds_routines.c index c5a7cd00..cc99e296 100644 --- a/libmachdev/ds_routines.c +++ b/libmachdev/ds_routines.c @@ -117,9 +117,11 @@ ds_device_open (mach_port_t open_port, mach_port_t reply_port, /* Fall back to opening kernel device master */ if (err) { - get_privileged_ports(NULL, &dev_master); - err = device_open (dev_master, mode, name, devp); - *devicePoly = MACH_MSG_TYPE_MOVE_SEND; + err = get_privileged_ports(NULL, &dev_master); + if (!err) + err = device_open (dev_master, mode, name, devp); + if (!err) + *devicePoly = MACH_MSG_TYPE_MOVE_SEND; } return err; } |