Skip to content

Commit

Permalink
raw/skeleton: add missing check after setting attribute
Browse files Browse the repository at this point in the history
[ upstream commit b970128 ]

This patch adds return value check for setting an attribute.

Fixes: 88a81bc ("raw/skeleton: remove compile-time constant for device id")

Signed-off-by: Min Hu (Connor) <humin29@huawei.com>
  • Loading branch information
hushenggitcount authored and cpaelzer committed Jun 10, 2021
1 parent de29f33 commit 6285f76
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions drivers/raw/skeleton/skeleton_rawdev_test.c
Expand Up @@ -291,6 +291,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);
Expand Down

0 comments on commit 6285f76

Please sign in to comment.