From 3f44132ade0d45e7851f46d6bb1241d10eccfff5 Mon Sep 17 00:00:00 2001 From: Stwsyburg Date: Tue, 18 Apr 2023 09:30:51 +0800 Subject: [PATCH] =?UTF-8?q?Fix:=20if=E8=AF=AD=E5=8F=A5=E7=9A=84=E5=88=A4?= =?UTF-8?q?=E6=96=AD=E6=9D=A1=E4=BB=B6=E5=AD=98=E5=9C=A8=E5=8F=98=E9=87=8F?= =?UTF-8?q?=E5=90=8D=E9=94=99=E8=AF=AF?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- bsp/at32/libraries/rt_drivers/drv_qspi.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/bsp/at32/libraries/rt_drivers/drv_qspi.c b/bsp/at32/libraries/rt_drivers/drv_qspi.c index f9a7283ecc..0268c387e5 100644 --- a/bsp/at32/libraries/rt_drivers/drv_qspi.c +++ b/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;