fix assignment instead of comparison in the mtd driver (#5649)