summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorLuiz Souza <luiz@netgate.com>2017-10-19 22:02:50 -0500
committerLuiz Souza <luiz@netgate.com>2017-10-19 22:07:20 -0500
commitb35450b5df04e9b82eebd8b0275c9f26d3ac47f1 (patch)
tree371884f064ca2a5c6ce224c3fcc1bf290e2d42af
parentb8e78fa8b51488c2b7da57061f2c6e718dba9e1e (diff)
downloadFreeBSD-src-b35450b5df04e9b82eebd8b0275c9f26d3ac47f1.zip
FreeBSD-src-b35450b5df04e9b82eebd8b0275c9f26d3ac47f1.tar.gz
Zero the dummy bytes sent in reads.
(cherry picked from commit e12e2b20dc451e4110d925e5b6b372c51a420759)
-rw-r--r--sys/dev/flash/mx25l.c1
1 files changed, 1 insertions, 0 deletions
diff --git a/sys/dev/flash/mx25l.c b/sys/dev/flash/mx25l.c
index 9c091bb..192c1de 100644
--- a/sys/dev/flash/mx25l.c
+++ b/sys/dev/flash/mx25l.c
@@ -397,6 +397,7 @@ mx25l_read(device_t dev, off_t offset, caddr_t data, off_t count)
txBuf[4] = 0;
}
+ memset(data, 0, count);
cmd.tx_cmd = txBuf;
cmd.rx_cmd = rxBuf;
cmd.tx_data = data;
OpenPOWER on IntegriCloud