kernel: mtk_bmt: allow get_mapping_block to return an error
[openwrt/staging/chunkeey.git] / target / linux / generic / files / drivers / mtd / nand / mtk_bmt_bbt.c
index fe1040802ecc21122cb62ac62272e4335228b627..3a58f522776d09b4e5ade4cbaca551db5c98657d 100644 (file)
@@ -39,7 +39,7 @@ bbt_set_block_state(u16 block, bool bad)
        write_bmt(bmtd.bmt_blk_idx, bmtd.bbt_buf);
 }
 
-static u16
+static int
 get_mapping_block_index_bbt(int block)
 {
        int start, end, ofs;