spiflashfast.c was doing if(data) but data is an address of a stack allocated array so it will always be non-zero. Removed the if(data) check