summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--drivers/mtd/nand/mxs_nand.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/drivers/mtd/nand/mxs_nand.c b/drivers/mtd/nand/mxs_nand.c
index 7f6351f..3b55ac2 100644
--- a/drivers/mtd/nand/mxs_nand.c
+++ b/drivers/mtd/nand/mxs_nand.c
@@ -1210,10 +1210,10 @@ err3:
for (--j; j >= 0; j--)
mxs_dma_release(j);
err2:
- free(info->desc);
-err1:
for (--i; i >= 0; i--)
mxs_dma_desc_free(info->desc[i]);
+ free(info->desc);
+err1:
printf("MXS NAND: Unable to allocate DMA descriptors\n");
return -ENOMEM;
}