Index: uspace/lib/c/generic/device/hw_res.c
===================================================================
--- uspace/lib/c/generic/device/hw_res.c	(revision f77c1c90c1f223647872d5cefa2d86f63bc846d7)
+++ uspace/lib/c/generic/device/hw_res.c	(revision c19a5a59bb6be5cf8da4e0c9a6a35d207103bc14)
@@ -140,9 +140,10 @@
  * @param channel DMA channel.
  *
- * @return Number of bytes remaining in the buffer if positive.
- * @return Error code if negative.
+ * @param[out] rem Number of bytes remaining in the buffer if positive.
+ *
+ * @return Error code.
  *
  */
-int hw_res_dma_channel_remain(async_sess_t *sess, unsigned channel)
+int hw_res_dma_channel_remain(async_sess_t *sess, unsigned channel, size_t *rem)
 {
 	async_exch_t *exch = async_exchange_begin(sess);
@@ -155,5 +156,5 @@
 	
 	if (ret == EOK)
-		return remain;
+		*rem = remain;
 	
 	return ret;
