Commit 8f0259c2 authored by Dan Carpenter's avatar Dan Carpenter Committed by Linus Torvalds

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: default avatarDan Carpenter <dan.carpenter@oracle.com>
Signed-off-by: default avatarAndrew Morton <akpm@linux-foundation.org>
Acked-by: default avatarLuis Chamberlain <mcgrof@kernel.org>
Link: http://lkml.kernel.org/r/20200228092452.vwkhthsn77nrxdy6@kili.mountainSigned-off-by: default avatarLinus Torvalds <torvalds@linux-foundation.org>
parent 8d994cad
...@@ -204,7 +204,7 @@ static void test_kmod_put_module(struct kmod_test_device_info *info) ...@@ -204,7 +204,7 @@ static void test_kmod_put_module(struct kmod_test_device_info *info)
case TEST_KMOD_DRIVER: case TEST_KMOD_DRIVER:
break; break;
case TEST_KMOD_FS_TYPE: 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); module_put(info->fs_sync->owner);
break; break;
default: default:
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment