From 08de6968c37cb04a37a5635e9cb2604c860b770a Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E5=BC=A0=E4=BC=9F=E6=B0=91?= Date: Tue, 30 Nov 2021 18:24:31 +0800 Subject: [PATCH] =?UTF-8?q?fixed=2075b5d6f=20from=20https://gitee.com/zhan?= =?UTF-8?q?gweimin24026/drivers=5Fframework/pulls/445=20Bug=20fixes:?= =?UTF-8?q?=E8=A7=A3=E5=86=B3Add=E5=BC=82=E5=B8=B8=E9=80=80=E5=87=BA=20?= =?UTF-8?q?=E8=B0=83=E7=94=A8Remove=E5=8F=91=E7=94=9FNULL=E6=8C=87?= =?UTF-8?q?=E9=92=88=E7=9A=84=E9=97=AE=E9=A2=98?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: 张伟民 --- support/platform/src/pin/pin_core.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/support/platform/src/pin/pin_core.c b/support/platform/src/pin/pin_core.c index 6b41ebd7d..86e594d5b 100644 --- a/support/platform/src/pin/pin_core.c +++ b/support/platform/src/pin/pin_core.c @@ -74,7 +74,9 @@ void PinCntlrRemove(struct PinCntlr *cntlr) } (void)PinCntlrListGet(); - DListRemove(&cntlr->list); + if ((cntlr->list.next != NULL) && (cntlr->list.prev != NULL)) { + DListRemove(&cntlr->list); + } PinCntlrListPut(); (void)OsalSpinDestroy(&cntlr->spin); } -- Gitee