diff options
author | Markus Elfring <elfring@users.sourceforge.net> | 2014-11-19 11:38:38 +0100 |
---|---|---|
committer | Greg Kroah-Hartman <gregkh@linuxfoundation.org> | 2014-11-27 04:41:15 +0100 |
commit | daa3d67fa3b5a997761ba594c6bca41b3e78963f (patch) | |
tree | 2430ce99e1ce93da854d7d60636fe34ad034e170 /drivers/base/firmware_class.c | |
parent | firmware loader: fix hung task warning dump (diff) | |
download | linux-daa3d67fa3b5a997761ba594c6bca41b3e78963f.tar.xz linux-daa3d67fa3b5a997761ba594c6bca41b3e78963f.zip |
firmware class: Deletion of an unnecessary check before the function call "vunmap"
The vunmap() function performes also input parameter validation. Thus the test
around the call is not needed.
This issue was detected by using the Coccinelle software.
Signed-off-by: Markus Elfring <elfring@users.sourceforge.net>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Diffstat (limited to 'drivers/base/firmware_class.c')
-rw-r--r-- | drivers/base/firmware_class.c | 3 |
1 files changed, 1 insertions, 2 deletions
diff --git a/drivers/base/firmware_class.c b/drivers/base/firmware_class.c index 9962744b59aa..58470c395301 100644 --- a/drivers/base/firmware_class.c +++ b/drivers/base/firmware_class.c @@ -591,8 +591,7 @@ static int fw_map_pages_buf(struct firmware_buf *buf) if (!buf->is_paged_buf) return 0; - if (buf->data) - vunmap(buf->data); + vunmap(buf->data); buf->data = vmap(buf->pages, buf->nr_pages, 0, PAGE_KERNEL_RO); if (!buf->data) return -ENOMEM; |