mt29f driver: initialize correctly kblock virtual table when unbuffered.
authoraleph <aleph@38d2e660-2303-0410-9eaa-f027e97ec537>
Fri, 6 May 2011 17:13:30 +0000 (17:13 +0000)
committeraleph <aleph@38d2e660-2303-0410-9eaa-f027e97ec537>
Fri, 6 May 2011 17:13:30 +0000 (17:13 +0000)
git-svn-id: https://src.develer.com/svnoss/bertos/trunk@4880 38d2e660-2303-0410-9eaa-f027e97ec537

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;
 }