]> git.baikalelectronics.ru Git - kernel.git/commit
x86: kvm: propagate register_shrinker return code
authorArnd Bergmann <arnd@arndb.de>
Wed, 10 Jan 2018 16:26:59 +0000 (17:26 +0100)
committerPaolo Bonzini <pbonzini@redhat.com>
Thu, 11 Jan 2018 15:53:13 +0000 (16:53 +0100)
commitf0548b760acd21aa75f22c1ef451c588eae4ea1c
tree938d708786a94958862ee10b51687d83ef0c42eb
parentc7102a44c7f11c717a35a0851b689798b3c3a5d5
x86: kvm: propagate register_shrinker return code

Patch "mm,vmscan: mark register_shrinker() as __must_check" is
queued for 4.16 in linux-mm and adds a warning about the unchecked
call to register_shrinker:

arch/x86/kvm/mmu.c:5485:2: warning: ignoring return value of 'register_shrinker', declared with attribute warn_unused_result [-Wunused-result]

This changes the kvm_mmu_module_init() function to fail itself
when the call to register_shrinker fails.

Signed-off-by: Arnd Bergmann <arnd@arndb.de>
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
arch/x86/kvm/mmu.c