diff options
author | Fabian Frederick <fabf@skynet.be> | 2017-06-02 16:52:01 +0300 |
---|---|---|
committer | Ingo Molnar <mingo@kernel.org> | 2017-06-05 18:50:40 +0300 |
commit | 171fd0222957abe28e6d78de667f457376f45cf1 (patch) | |
tree | 8afe2646d1901ae60c3d2bb729cd97a6e4061aba /drivers/firmware/efi/capsule-loader.c | |
parent | 82c3768b8d68c40ecde92338899c838b7c674ffb (diff) | |
download | linux-171fd0222957abe28e6d78de667f457376f45cf1.tar.xz |
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>
Diffstat (limited to 'drivers/firmware/efi/capsule-loader.c')
-rw-r--r-- | drivers/firmware/efi/capsule-loader.c | 4 |
1 files changed, 0 insertions, 4 deletions
diff --git a/drivers/firmware/efi/capsule-loader.c b/drivers/firmware/efi/capsule-loader.c index 5b012a467d7d..2357bcdcb44d 100644 --- a/drivers/firmware/efi/capsule-loader.c +++ b/drivers/firmware/efi/capsule-loader.c @@ -170,10 +170,6 @@ static ssize_t efi_capsule_write(struct file *file, const char __user *buff, page = cap_info->pages[cap_info->index - 1]; kbuff = kmap(page); - if (!kbuff) { - ret = -ENOMEM; - goto failed; - } kbuff += PAGE_SIZE - cap_info->page_bytes_remain; /* Copy capsule binary data from user space to kernel space buffer */ |