efi/capsule: Remove NULL test on kmap()
kmap() can't fail. Signed-off-by: Fabian Frederick <fabf@skynet.be> Signed-off-by: Matt Fleming <matt@codeblueprint.co.uk> Signed-off-by: Ard Biesheuvel <ard.biesheuvel@linaro.org> Cc: Kweh Hock Leong <hock.leong.kweh@intel.com> Cc: Linus Torvalds <torvalds@linux-foundation.org> Cc: Peter Zijlstra <peterz@infradead.org> Cc: Thomas Gleixner <tglx@linutronix.de> Cc: linux-efi@vger.kernel.org Link: http://lkml.kernel.org/r/20170602135207.21708-8-ard.biesheuvel@linaro.org Signed-off-by: Ingo Molnar <mingo@kernel.org>
This commit is contained in:

committed by
Ingo Molnar

parent
82c3768b8d
commit
171fd02229
@@ -247,10 +247,6 @@ int efi_capsule_update(efi_capsule_header_t *capsule, struct page **pages)
|
||||
efi_capsule_block_desc_t *sglist;
|
||||
|
||||
sglist = kmap(sg_pages[i]);
|
||||
if (!sglist) {
|
||||
rv = -ENOMEM;
|
||||
goto out;
|
||||
}
|
||||
|
||||
for (j = 0; j < SGLIST_PER_PAGE && count > 0; j++) {
|
||||
u64 sz = min_t(u64, imagesize, PAGE_SIZE);
|
||||
|
Reference in New Issue
Block a user