Memory returned by dma_alloc_coherent() should already be zeroed
out, so there's no need to do this explicitly.

Signed-off-by: Andrey Smirnov <[email protected]>
---
 drivers/mtd/nand/nand_mxs.c | 3 ---
 1 file changed, 3 deletions(-)

diff --git a/drivers/mtd/nand/nand_mxs.c b/drivers/mtd/nand/nand_mxs.c
index 28a07d4cb..c3b07aa3f 100644
--- a/drivers/mtd/nand/nand_mxs.c
+++ b/drivers/mtd/nand/nand_mxs.c
@@ -1271,8 +1271,6 @@ static int mxs_nand_alloc_buffers(struct mxs_nand_info 
*nand_info)
                return -ENOMEM;
        }
 
-       memset(buf, 0, size);
-
        nand_info->data_buf = buf;
        nand_info->oob_buf = buf + NAND_MAX_PAGESIZE;
 
@@ -1284,7 +1282,6 @@ static int mxs_nand_alloc_buffers(struct mxs_nand_info 
*nand_info)
                printf("MXS NAND: Error allocating command buffers\n");
                return -ENOMEM;
        }
-       memset(nand_info->cmd_buf, 0, MXS_NAND_COMMAND_BUFFER_SIZE);
        nand_info->cmd_queue_len = 0;
 
        return 0;
-- 
2.21.0


_______________________________________________
barebox mailing list
[email protected]
http://lists.infradead.org/mailman/listinfo/barebox

Reply via email to