Skip to content

Commit ae6dd8d

Browse files
committed
Merge tag 'for-linus-20160928' of git://git.infradead.org/linux-mtd
Pull late MTD fixes from Brian Norris: "Another round of MTD fixes for v4.8 My apologies for sending this so late. I've been fairly absent as a maintainer this cycle, but I did queue these up weeks ago. In the meantime, Richard was able to handle some other fixes (thanks!) but didn't pick these up. On the bright side, these are very simple changes that should carry little risk. Summary: - Davinci NAND: fix a long-standing bug in how we clear/prep 4-bit ECC - OMAP NAND: an error-handling fix that made it into v4.8-rc1 caused error-handling cases in other configurations/code-paths; this fixes the fix" * tag 'for-linus-20160928' of git://git.infradead.org/linux-mtd: mtd: nand: davinci: Reinitialize the HW ECC engine in 4bit hwctl mtd: nand: omap2: Don't call dma_release_channel() if dma_request_chan() failed
2 parents 0a966fa + f6d7c1b commit ae6dd8d

File tree

2 files changed

+4
-1
lines changed

2 files changed

+4
-1
lines changed

drivers/mtd/nand/davinci_nand.c

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -240,6 +240,9 @@ static void nand_davinci_hwctl_4bit(struct mtd_info *mtd, int mode)
240240
unsigned long flags;
241241
u32 val;
242242

243+
/* Reset ECC hardware */
244+
davinci_nand_readl(info, NAND_4BIT_ECC1_OFFSET);
245+
243246
spin_lock_irqsave(&davinci_nand_lock, flags);
244247

245248
/* Start 4-bit ECC calculation for read/write */

drivers/mtd/nand/omap2.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2169,7 +2169,7 @@ static int omap_nand_probe(struct platform_device *pdev)
21692169
return 0;
21702170

21712171
return_error:
2172-
if (info->dma)
2172+
if (!IS_ERR_OR_NULL(info->dma))
21732173
dma_release_channel(info->dma);
21742174
if (nand_chip->ecc.priv) {
21752175
nand_bch_free(nand_chip->ecc.priv);

0 commit comments

Comments
 (0)