OSDN Git Service

test_firmware: fix error return getting clobbered
authorColin Ian King <colin.king@canonical.com>
Fri, 19 Oct 2018 12:58:01 +0000 (13:58 +0100)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Sun, 11 Nov 2018 17:18:04 +0000 (09:18 -0800)
commit8bb0a88600f0267cfcc245d34f8c4abe8c282713
tree51c5d10e28d418b3082847b920035beeed317993
parent0749aa25af82c690395a96e799cd2c6e54c459cf
test_firmware: fix error return getting clobbered

In the case where eq->fw->size > PAGE_SIZE the error return rc
is being set to EINVAL however this is being overwritten to
rc = req->fw->size because the error exit path via label 'out' is
not being taken.  Fix this by adding the jump to the error exit
path 'out'.

Detected by CoverityScan, CID#1453465 ("Unused value")

Fixes: c92316bf8e94 ("test_firmware: add batched firmware tests")
Signed-off-by: Colin Ian King <colin.king@canonical.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
lib/test_firmware.c