soft_uart: osmo_soft_uart_tx_ubits(): return number of bits pulled

This is a partial revert of 0887188c6b133b69142965d65e1be8a0696a6272.

We actually want to return number of bits pulled, because in the upcoming
commit implementing the flow control we want to be able to signal to the
caller that the buffer was not completely filled, but only partly.

Change-Id: I47a56f0fc36f2bc8f5a797d7fec64dfb56842388
Related: OS#4396
diff --git a/src/core/soft_uart.c b/src/core/soft_uart.c
index a1888d6..5750282 100644
--- a/src/core/soft_uart.c
+++ b/src/core/soft_uart.c
@@ -277,7 +277,7 @@
  * \param[in] suart soft-UART instance to pull the bits from.
  * \param[out] ubits pointer to a buffer where to store pulled bits.
  * \param[in] n_ubits number of unpacked bits to be pulled.
- * \returns 0 on success; negative on error.
+ * \returns number of bits pulled; negative on error.
  *          -EAGAIN indicates that the transmitter is disabled. */
 int osmo_soft_uart_tx_ubits(struct osmo_soft_uart *suart, ubit_t *ubits, size_t n_ubits)
 {
@@ -318,7 +318,7 @@
 		ubits[i] = suart_tx_bit(suart, msg);
 	msgb_free(msg);
 
-	return 0;
+	return n_ubits;
 }
 
 /*! Set the modem status lines of the given soft-UART.