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 C8608A09E4; Thu, 22 Apr 2021 08:21:40 +0200 (CEST) Received: from [217.70.189.124] (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id 4C056413FA; Thu, 22 Apr 2021 08:21:40 +0200 (CEST) Received: from szxga04-in.huawei.com (szxga04-in.huawei.com [45.249.212.190]) by mails.dpdk.org (Postfix) with ESMTP id 1692D413E6 for ; Thu, 22 Apr 2021 08:21:39 +0200 (CEST) Received: from DGGEMS405-HUB.china.huawei.com (unknown [172.30.72.59]) by szxga04-in.huawei.com (SkyGuard) with ESMTP id 4FQnLl6yt6z16LKM; Thu, 22 Apr 2021 14:19:11 +0800 (CST) Received: from localhost.localdomain (10.69.192.56) by DGGEMS405-HUB.china.huawei.com (10.3.19.205) with Microsoft SMTP Server id 14.3.498.0; Thu, 22 Apr 2021 14:21:33 +0800 From: "Min Hu (Connor)" To: CC: , , Date: Thu, 22 Apr 2021 14:21:46 +0800 Message-ID: <1619072506-48243-1-git-send-email-humin29@huawei.com> X-Mailer: git-send-email 2.7.4 MIME-Version: 1.0 Content-Type: text/plain X-Originating-IP: [10.69.192.56] X-CFilter-Loop: Reflected Subject: [dpdk-dev] [PATCH] raw/skeleton: fix return value check 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 Sender: "dev" This patch adds return value check for setting an attribute. Fixes: 88a81bcecb7b ("raw/skeleton: remove compile-time constant for device id") Cc: stable@dpdk.org Signed-off-by: Min Hu (Connor) --- drivers/raw/skeleton/skeleton_rawdev_test.c | 1 + 1 file changed, 1 insertion(+) diff --git a/drivers/raw/skeleton/skeleton_rawdev_test.c b/drivers/raw/skeleton/skeleton_rawdev_test.c index 1405df0..484468e 100644 --- a/drivers/raw/skeleton/skeleton_rawdev_test.c +++ b/drivers/raw/skeleton/skeleton_rawdev_test.c @@ -295,6 +295,7 @@ test_rawdev_attr_set_get(void) dummy_value = &set_value; *dummy_value = 200; ret = rte_rawdev_set_attr(test_dev_id, "Test2", (uintptr_t)dummy_value); + RTE_TEST_ASSERT(!ret, "Unable to set an attribute (Test2)"); /* Check if attributes have been set */ ret = rte_rawdev_get_attr(test_dev_id, "Test1", &ret_value); -- 2.7.4