Explorar o código

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

Stwsyburg %!s(int64=2) %!d(string=hai) anos
pai
achega
3f44132ade
Modificáronse 1 ficheiros con 1 adicións e 1 borrados
  1. 1 1
      bsp/at32/libraries/rt_drivers/drv_qspi.c

+ 1 - 1
bsp/at32/libraries/rt_drivers/drv_qspi.c

@@ -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;