1
0
Fork 0
mirror of https://github.com/betaflight/betaflight.git synced 2025-07-24 16:55:36 +03:00

Merge pull request #7080 from jflyper/bfdev-fix-do-not-call-flashIsReady-when-no-flash

[FLASHFS] Avoid calling flashIsReady when flash chip is non-existent
This commit is contained in:
Michael Keller 2018-11-13 23:07:22 +13:00 committed by GitHub
commit a2cfa7b1f0
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -110,7 +110,9 @@ void flashfsEraseRange(uint32_t start, uint32_t end)
*/
bool flashfsIsReady(void)
{
return flashIsReady();
// Check for flash chip existence first, then check if ready.
return (flashfsIsSupported() && flashIsReady());
}
bool flashfsIsSupported(void)