Fix: if语句的判断条件存在变量名错误

This commit is contained in:
Stwsyburg 2023-04-18 09:30:51 +08:00 committed by Man, Jianting (Meco)
parent 308c1c66c8
commit 3f44132ade
1 changed files with 1 additions and 1 deletions

View File

@ -449,7 +449,7 @@ rt_err_t at32_qspi_bus_attach_device(const char *bus_name, const char *device_na
goto __exit;
}
cs_pin = (struct at32_hw_spi_cs *)rt_malloc(sizeof(struct at32_hw_spi_cs));
if (qspi_device == RT_NULL)
if (cs_pin == RT_NULL)
{
LOG_E("no memory, qspi bus attach device failed!");
result = -RT_ENOMEM;