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>
@@ -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;
}