From: Min Hu (Connor) Date: Thu, 22 Apr 2021 06:21:46 +0000 (+0800) Subject: raw/skeleton: add missing check after setting attribute X-Git-Url: http://git.droids-corp.org/?a=commitdiff_plain;h=b97012825dfad7d30bbd1fa99ec6115eba6135ce;p=dpdk.git 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) --- 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);