From b97012825dfad7d30bbd1fa99ec6115eba6135ce Mon Sep 17 00:00:00 2001 From: "Min Hu (Connor)" Date: Thu, 22 Apr 2021 14:21:46 +0800 Subject: [PATCH] raw/skeleton: add missing check after setting attribute 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 1405df080d..484468eeb4 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.20.1