浏览代码

staging: pi433: pi433_write fixed the return value

The pi433_write function should return the number of processed bytes

Reported-by: Marcin Ciupak <marcin.s.ciupak@gmail.com>
Signed-off-by: Oliver Graute <oliver.graute@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Oliver Graute 7 年之前
父节点
当前提交
dd1114693b
共有 1 个文件被更改,包括 1 次插入1 次删除
  1. 1 1
      drivers/staging/pi433/pi433_if.c

+ 1 - 1
drivers/staging/pi433/pi433_if.c

@@ -837,7 +837,7 @@ pi433_write(struct file *filp, const char __user *buf,
 	wake_up_interruptible(&device->tx_wait_queue);
 	dev_dbg(device->dev, "write: generated new msg with %d bytes.", copied);
 
-	return 0;
+	return copied;
 
 abort:
 	dev_dbg(device->dev, "write to fifo failed: 0x%x", retval);