From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mails.dpdk.org (mails.dpdk.org [217.70.189.124]) by inbox.dpdk.org (Postfix) with ESMTP id 128DDA00C4; Sat, 29 Jan 2022 19:07:44 +0100 (CET) Received: from [217.70.189.124] (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id 9E61840DF5; Sat, 29 Jan 2022 19:07:43 +0100 (CET) Received: from out162-62-57-137.mail.qq.com (out162-62-57-137.mail.qq.com [162.62.57.137]) by mails.dpdk.org (Postfix) with ESMTP id DAD9940041 for ; Sat, 29 Jan 2022 19:07:41 +0100 (CET) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=foxmail.com; s=s201512; t=1643479659; bh=+KpJFyOkM2y1141Vj2EN2zuB5u2WkwwfbOEdFUC9CY4=; h=From:To:Cc:Subject:Date; b=m67aNZ5pmi+qOK/7GvB36QtMj5V6gn3JVKs552FOFwIY28RN8KAMqYbBFa+xGAtBf dG5WrO6gBIXBeET/TcadGDz3vXPoqhRxndnOLULANLjeLDqpPd51g0KZCjNNR8hfl1 WE+zO+0Q+rIXPgMM8gAGjuqtOJM2Cavb0Hh/EOHQ= Received: from liwg-ubuntu.lan ([111.193.130.237]) by newxmesmtplogicsvrszc9.qq.com (NewEsmtp) with SMTP id 1DE81E88; Sun, 30 Jan 2022 02:07:30 +0800 X-QQ-mid: xmsmtpt1643479650twnpi258b Message-ID: X-QQ-XMAILINFO: ND42uzdxTIzr2YEOj0mwip3WDq7UbrhN3yw9fdURa1tvv7wrwMORfAX5UbwAej NgU82f8PuZ6DLJ+muiW/Oacp7jCf0JBP3qbq1rO57sdpsUxnU2/p34HjdSUXRO6ckSKHejDAPwr1 sAHsFheVScy1D2Wc8UZtM6WC+kzdqzXeVIetMKTE1uFjQA9+elPM56y5TAHfpJKO1V/+kkXb9fxA l0UdhcxK/5PZJ/mxRbYWb1hWHbKBrQIOXN/ILSDB6vkAbnC68BfnE+ozA7OSdedkLKXlT7oMF/l9 SRu7m+QuRiJF4E5CnO6NIfrKXY4HDXQLpg/gPyjOPMGjGdttcCN1X0o2pXQTocsbt87HVb09IXvC kzeCiTckrxE9DBn8IIESAhmTkraIJNU/FpWoqL8WbIotlhbCfLloqrPPmJ3lr2fSHyXoQLxGvrBg VaEI5DDIkkPXKAsvWl8VJ6crgil9cuW+Q6k3bLpvJCp/QDQkHcM/2cfkwnhl1Ti/kmMNP0JLZv+I 93s/fuLchcKclqKiqAgqnmJF8KjG8Tmj5YJQbydWbdpI+DeDzD/zaWzx6tQ8fRSmgQCKy0NfXXwP nj8qTW+1NSZg9BMsgI2wgRBiSDIWsrGLbBPkuDBG7QblVob8W3oNNHcP9mfpupOWPXZSibdUlL4n sftzmlhhU0hWftwHqM2bSSoclha3zdwETlMf9090UH3QbRvxRbzWLW0Yr9ERsS+edD301wG7kvoQ /HkXFyHIWB07CqFJiStc13LImdIlurb1D9AOTOGy39hv4kqv+dAki93ClJ+6RPCcsZVp9ofyhL9E ADShfqqHzzhUeaFWOFNeO1fP/105bcGuzOirJs/HeL2dERhkGHG/Ak7sH1pyBCClqVvs6SASOAra EB0f8cXW41yc2Un+mxWKPau6Sl14d8Xg== From: Weiguo Li To: vsrivast@xilinx.com Cc: dev@dpdk.org Subject: [PATCH v2] vdpa/sfc: fix null dereference Date: Sun, 30 Jan 2022 02:07:30 +0800 X-OQ-MSGID: <20220129180730.674049-1-liwg06@foxmail.com> X-Mailer: git-send-email 2.25.1 MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-BeenThere: dev@dpdk.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: DPDK patches and discussions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: dev-bounces@dpdk.org Fixes: b11961363b4a ("vdpa/sfc: support device configure and close") Signed-off-by: Weiguo Li --- drivers/vdpa/sfc/sfc_vdpa_ops.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/drivers/vdpa/sfc/sfc_vdpa_ops.c b/drivers/vdpa/sfc/sfc_vdpa_ops.c index c4ce4474ef..b3d9b6cd56 100644 --- a/drivers/vdpa/sfc/sfc_vdpa_ops.c +++ b/drivers/vdpa/sfc/sfc_vdpa_ops.c @@ -611,7 +611,7 @@ sfc_vdpa_dev_config(int vid) ops_data = sfc_vdpa_get_data_by_dev(vdpa_dev); if (ops_data == NULL) { - sfc_vdpa_err(ops_data->dev_handle, + SFC_VDPA_GENERIC_LOG(ERR, "invalid vDPA device : %p, vid : %d", vdpa_dev, vid); return -1; @@ -666,7 +666,7 @@ sfc_vdpa_dev_close(int vid) ops_data = sfc_vdpa_get_data_by_dev(vdpa_dev); if (ops_data == NULL) { - sfc_vdpa_err(ops_data->dev_handle, + SFC_VDPA_GENERIC_LOG(ERR, "invalid vDPA device : %p, vid : %d", vdpa_dev, vid); return -1; -- 2.25.1