]> git.ipfire.org Git - thirdparty/kernel/stable.git/commit
fpga: Simplify and improve fpga bridge test using deferred actions
authorMarco Pagani <marpagan@redhat.com>
Thu, 25 Jul 2024 12:50:30 +0000 (14:50 +0200)
committerXu Yilun <yilun.xu@linux.intel.com>
Wed, 14 Aug 2024 15:51:03 +0000 (23:51 +0800)
commit3c2c01849c01e7e3c99124a7fb7f238b7c9a2348
treefb682bfb3bc91fba6680d17ea276bbae656d3070
parentdbcbd3650f305df708b569517c063c7644cf0d89
fpga: Simplify and improve fpga bridge test using deferred actions

Use deferred actions to simplify the test suite and avoid potential memory
leaks when test cases fail. Remove unnecessary calls to
kunit_device_unregister() since kunit devices are tied to the test context
and released by a deferred action when the test is completed.

Signed-off-by: Marco Pagani <marpagan@redhat.com>
Acked-by: Xu Yilun <yilun.xu@intel.com>
Link: https://lore.kernel.org/r/20240725125031.308195-3-marpagan@redhat.com
Signed-off-by: Xu Yilun <yilun.xu@linux.intel.com>
drivers/fpga/tests/fpga-bridge-test.c