sdmmc: Correctly check function parameters before using them
sdmmc: Correctly check function parameters before using them

Closes https://github.com/espressif/esp-idf/pull/5000

espressif/esp-idf,espressif/esp-idf,espressif/esp-idf,espressif/esp-idf