From 1ee803a790090c306765fe1b598b9d8d0a91e2b3 Mon Sep 17 00:00:00 2001 From: Chris Wilson Date: Sat, 17 Dec 2016 11:10:35 +0000 Subject: lib/igt_kmod: kmod already supplies a cooked error code kmod already does the err = -errno for us. Signed-off-by: Chris Wilson --- lib/igt_kmod.c | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) (limited to 'lib') diff --git a/lib/igt_kmod.c b/lib/igt_kmod.c index 109fa81f..c41367d8 100644 --- a/lib/igt_kmod.c +++ b/lib/igt_kmod.c @@ -431,9 +431,7 @@ void igt_kselftests(const char *module_name, snprintf(options, sizeof(options), "%s=1 %s", tl->param, module_options ?: ""); - err = 0; - if (modprobe(kmod, options)) - err = -errno; + err = modprobe(kmod, options); kmod_module_remove_module(kmod, 0); if (err == -ENOTTY) /* special case */ -- cgit v1.2.3