efi_loader: fix efi_dp_from_name()
authorHeinrich Schuchardt <xypron.glpk@gmx.de>
Wed, 30 Oct 2019 19:13:24 +0000 (20:13 +0100)
committerHeinrich Schuchardt <xypron.glpk@gmx.de>
Tue, 12 Nov 2019 22:13:54 +0000 (23:13 +0100)
commitcab6f06c14a2a059621ef51b241a0089beb48cfd
tree09c9fdb26ee9cf41915aa925279ed7e5baf86ac3
parent3ff1ff3ff76c15efe0451309af084ee6c096c583
efi_loader: fix efi_dp_from_name()

Correctly check the return value of efi_dp_from_file().
If we can determine device path for the file, should not depend on the
device path for the device being requested.
Provide a function description for efi_dp_from_name().

Reported-by: Coverity CID 273159, CID 273158
Fixes: 08c51fff30cc ("efi_loader: device_path: check against file path length")
Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
lib/efi_loader/efi_device_path.c