From 0fef90dc4c7faf43fe0294115dca811b62c35152 Mon Sep 17 00:00:00 2001 From: CTCaer Date: Tue, 15 Feb 2022 00:36:23 +0200 Subject: [PATCH] bdk: sd: return proper error for sd file save --- bdk/storage/sd.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/bdk/storage/sd.c b/bdk/storage/sd.c index a20975b..8549e55 100644 --- a/bdk/storage/sd.c +++ b/bdk/storage/sd.c @@ -240,7 +240,7 @@ int sd_save_to_file(void *buf, u32 size, const char *filename) FIL fp; u32 res = 0; if (!sd_get_card_mounted()) - return NULL; + return FR_DISK_ERR; res = f_open(&fp, filename, FA_CREATE_ALWAYS | FA_WRITE); if (res)