<div class="pre">In get_contents function (fs/fat/fat.c), </div>
<div class="pre">There is code that checks the return value of get_fatent() at 360th line.</div>
<div class="pre"> </div>
<div class="pre"><a class="linenr" id="l355" href="http://www.denx.de/cgi-bin/gitweb.cgi?p=u-boot.git;a=blob;f=fs/fat/fat.c;h=e98e50ae774bc2802d183e5888f26ec7b9b8fef1;hb=HEAD#l355">355</a> /* search for consecutive clusters */
</div>
<div class="pre"><a class="linenr" id="l356" href="http://www.denx.de/cgi-bin/gitweb.cgi?p=u-boot.git;a=blob;f=fs/fat/fat.c;h=e98e50ae774bc2802d183e5888f26ec7b9b8fef1;hb=HEAD#l356">356</a> while(actsize < filesize) {
</div>
<div class="pre"><a class="linenr" id="l357" href="http://www.denx.de/cgi-bin/gitweb.cgi?p=u-boot.git;a=blob;f=fs/fat/fat.c;h=e98e50ae774bc2802d183e5888f26ec7b9b8fef1;hb=HEAD#l357">357</a> newclust = get_fatent(mydata, endclust);
</div>
<div class="pre"><a class="linenr" id="l358" href="http://www.denx.de/cgi-bin/gitweb.cgi?p=u-boot.git;a=blob;f=fs/fat/fat.c;h=e98e50ae774bc2802d183e5888f26ec7b9b8fef1;hb=HEAD#l358">358</a> if((newclust -1)!=endclust)
</div>
<div class="pre"><a class="linenr" id="l359" href="http://www.denx.de/cgi-bin/gitweb.cgi?p=u-boot.git;a=blob;f=fs/fat/fat.c;h=e98e50ae774bc2802d183e5888f26ec7b9b8fef1;hb=HEAD#l359">359</a> goto getit;
</div>
<div class="pre"><a class="linenr" id="l360" href="http://www.denx.de/cgi-bin/gitweb.cgi?p=u-boot.git;a=blob;f=fs/fat/fat.c;h=e98e50ae774bc2802d183e5888f26ec7b9b8fef1;hb=HEAD#l360">360</a> if (newclust <= 0x0001 || newclust >= 0xfff0) {
</div>
<div class="pre"> </div>
<div class="pre">I think this comparison ( >= 0xfff0 ) is only for FAT16.</div>
<div class="pre">FAT32 value can be much larger.</div>
<div class="pre">Is this a bug?</div>
<div class="pre"> </div>