Index: uspace/lib/c/generic/device/hw_res.c
===================================================================
--- uspace/lib/c/generic/device/hw_res.c	(revision 38d150e6238ab44c861f6486e46454e07caeb0f0)
+++ uspace/lib/c/generic/device/hw_res.c	(revision f43742e2319f2b70763dd51bbc6ef09fd8a86f2e)
@@ -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;
