]> git.kernelconcepts.de Git - karo-tx-linux.git/blobdiff - include/linux/mtd/nand.h
mtd: nand: complain loudly when chip->bits_per_cell is not correctly initialized
[karo-tx-linux.git] / include / linux / mtd / nand.h
index 5216d2eb22891010187b86a5911a10b17aedf273..14761eb01e560100ad19d6e1648632da8e56a782 100644 (file)
@@ -1246,6 +1246,8 @@ int onfi_init_data_interface(struct nand_chip *chip,
  */
 static inline bool nand_is_slc(struct nand_chip *chip)
 {
+       WARN(chip->bits_per_cell == 0,
+            "chip->bits_per_cell is used uninitialized\n");
        return chip->bits_per_cell == 1;
 }