mt29f driver: initialize correctly kblock virtual table when unbuffered.
[bertos.git] / bertos / cpu / cortex-m3 / drv / mt29f_sam3.c
index 73faca1d1d418f13ef4c1db86317d99341f2231f..30afed07ab6ff747e0b2f5b28a44d0920418d3d0 100644 (file)
@@ -877,8 +877,11 @@ bool mt29f_init(Mt29f *chip, struct Heap *heap, unsigned chip_select)
 
 bool mt29f_initUnbuffered(Mt29f *chip, struct Heap *heap, unsigned chip_select)
 {
+       if (!commonInit(chip, heap, chip_select))
+               return false;
+
        chip->fd.priv.vt = &mt29f_unbuffered_vt;
-       return commonInit(chip, heap, chip_select);
+       return true;
 }