forked from luck/tmp_suning_uos_patched
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>
This commit is contained in:
parent
000deba73a
commit
daa3d67fa3
|
@ -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;
|
||||
|
|
Loading…
Reference in New Issue
Block a user