summaryrefslogtreecommitdiff
path: root/lib
diff options
context:
space:
mode:
authorDan Carpenter <dan.carpenter@oracle.com>2020-04-07 06:10:35 +0300
committerLinus Torvalds <torvalds@linux-foundation.org>2020-04-07 20:43:43 +0300
commit8f0259c27c850403c6a2076ef07180dd802da559 (patch)
treef152f5ddef91eeb3eb30a24f3f2e81d118da99dd /lib
parent8d994cada27c565adfaa5ac524cc1bc099668dfd (diff)
downloadlinux-8f0259c27c850403c6a2076ef07180dd802da559.tar.xz
lib/test_kmod.c: remove a NULL test
The "info" pointer has already been dereferenced so checking here is too late. Fortunately, we never pass NULL pointers to the test_kmod_put_module() function so the test can simply be removed. Signed-off-by: Dan Carpenter <dan.carpenter@oracle.com> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Acked-by: Luis Chamberlain <mcgrof@kernel.org> Link: http://lkml.kernel.org/r/20200228092452.vwkhthsn77nrxdy6@kili.mountain Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Diffstat (limited to 'lib')
-rw-r--r--lib/test_kmod.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/lib/test_kmod.c b/lib/test_kmod.c
index 9cf77628fc91..e651c37d56db 100644
--- a/lib/test_kmod.c
+++ b/lib/test_kmod.c
@@ -204,7 +204,7 @@ static void test_kmod_put_module(struct kmod_test_device_info *info)
case TEST_KMOD_DRIVER:
break;
case TEST_KMOD_FS_TYPE:
- if (info && info->fs_sync && info->fs_sync->owner)
+ if (info->fs_sync && info->fs_sync->owner)
module_put(info->fs_sync->owner);
break;
default: