efi_loader: check parameter new_handle of efi_file_open()

We should not check parameter file twice.
We should check parameter new_handle.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Signed-off-by: Alexander Graf <agraf@suse.de>
This commit is contained in:
Heinrich Schuchardt 2018-09-15 20:43:46 +02:00 committed by Alexander Graf
parent 6e6e4b2f73
commit d3dce35aab

View File

@ -218,7 +218,7 @@ static efi_status_t EFIAPI efi_file_open(struct efi_file_handle *file,
open_mode, attributes);
/* Check parameters */
if (!file || !file || !file_name) {
if (!file || !new_handle || !file_name) {
ret = EFI_INVALID_PARAMETER;
goto out;
}