diff --git a/libubb/swuart.c b/libubb/swuart.c index 4ff81a6..da1b977 100644 --- a/libubb/swuart.c +++ b/libubb/swuart.c @@ -12,7 +12,6 @@ #include -#include #include #include @@ -238,10 +237,8 @@ int swuart_open(uint32_t tx, uint32_t rx, int bps) * Make sure code and rx/tx buffers are locked into memory before we * disable interrupts in swuart_trx. */ - if (mlockall(MCL_CURRENT | MCL_FUTURE)) { - perror("mlockall"); + if (mlockall(MCL_CURRENT | MCL_FUTURE)) return -1; - } ticks = TCLK/bps-1; tx_mask = tx; @@ -257,6 +254,5 @@ int swuart_open(uint32_t tx, uint32_t rx, int bps) void swuart_close(void) { - if (munlockall()) - perror("munlockall"); + munlockall(); }