summaryrefslogtreecommitdiff
path: root/include/efi_loader.h
diff options
context:
space:
mode:
authorRob Clark <robdclark@gmail.com>2017-07-27 08:04:16 -0400
committerAlexander Graf <agraf@suse.de>2017-07-28 09:14:01 +0200
commit3f1aa97577b75ee2f4f13d2b9fbaf68ce89f42be (patch)
tree99f6114a09b4674c3b5b0dc5ec2b4ae6ddf00cf3 /include/efi_loader.h
parent6cfd5f133ac11becc0dd2c9b93e275af45ea384f (diff)
efi_loader: only evaluate EFI_EXIT()'s ret once
There are a couple spots doing things like: return EFI_EXIT(some_fxn(...)); which I handn't noticed before. With addition of printing return value in the EFI_EXIT() macro, now the fxn call was getting evaluated twice. Which we didn't really want. Signed-off-by: Rob Clark <robdclark@gmail.com> Signed-off-by: Alexander Graf <agraf@suse.de>
Diffstat (limited to 'include/efi_loader.h')
-rw-r--r--include/efi_loader.h5
1 files changed, 3 insertions, 2 deletions
diff --git a/include/efi_loader.h b/include/efi_loader.h
index f384cbbe77..9700a88d69 100644
--- a/include/efi_loader.h
+++ b/include/efi_loader.h
@@ -21,8 +21,9 @@
} while(0)
#define EFI_EXIT(ret) ({ \
- debug("EFI: Exit: %s: %u\n", __func__, (u32)((ret) & ~EFI_ERROR_MASK)); \
- efi_exit_func(ret); \
+ efi_status_t _r = ret; \
+ debug("EFI: Exit: %s: %u\n", __func__, (u32)(_r & ~EFI_ERROR_MASK)); \
+ efi_exit_func(_r); \
})
extern struct efi_runtime_services efi_runtime_services;