summaryrefslogtreecommitdiff
path: root/lib
diff options
context:
space:
mode:
authorChris Wilson <chris@chris-wilson.co.uk>2016-12-17 11:10:35 +0000
committerChris Wilson <chris@chris-wilson.co.uk>2016-12-17 11:11:35 +0000
commit1ee803a790090c306765fe1b598b9d8d0a91e2b3 (patch)
tree6bfb0b2effb15281ba8af9f70e89035544250343 /lib
parent270d782c39655ad9fdb72b5324f48f275ffef386 (diff)
lib/igt_kmod: kmod already supplies a cooked error code
kmod already does the err = -errno for us. Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
Diffstat (limited to 'lib')
-rw-r--r--lib/igt_kmod.c4
1 files changed, 1 insertions, 3 deletions
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 */