mtd: onenand: add missing check