Skip to content

Commit

Permalink
Fix bad error code return
Browse files Browse the repository at this point in the history
  • Loading branch information
greiman committed Jun 4, 2024
1 parent aadedbf commit 052d38e
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions src/SdCard/SdCard.h
Original file line number Diff line number Diff line change
Expand Up @@ -67,7 +67,8 @@ class SdCardFactory {
* \return generic card pointer or nullptr if failure.
*/
SdCard* newCard(SdSpiConfig config) {
return m_spiCard.begin(config) ? &m_spiCard : nullptr;
m_spiCard.begin(config);
return &m_spiCard;
}
/** Initialize SDIO card.
*
Expand All @@ -76,7 +77,8 @@ class SdCardFactory {
*/
SdCard* newCard(SdioConfig config) {
#if HAS_SDIO_CLASS
return m_sdioCard.begin(config) ? &m_sdioCard : nullptr;
m_sdioCard.begin(config);
return &m_sdioCard;
#else // HAS_SDIO_CLASS
(void)config;
return nullptr;
Expand Down

0 comments on commit 052d38e

Please sign in to comment.