Message ID | 20240423053806.4962-1-ilias.apalodimas@linaro.org |
---|---|
State | Accepted |
Commit | 5025d029a95ff3865875684160da08d2f40e5133 |
Headers | show |
Series | efi_loader: address coverity report 492766 for dead code | expand |
On 23.04.24 07:38, Ilias Apalodimas wrote: > The check of the return code is already done a few lines above. > Although it doesn't cause any functional issues, remove the superfluous > checks > > Addresses-Coverity-ID: 492766 Control flow issues (DEADCODE) > Signed-off-by: Ilias Apalodimas <ilias.apalodimas@linaro.org> Reviewed-by: Heinrich Schuchardt <heinrich.schuchardt@canonical.com> > --- > lib/efi_loader/efi_var_mem.c | 2 -- > 1 file changed, 2 deletions(-) > > diff --git a/lib/efi_loader/efi_var_mem.c b/lib/efi_loader/efi_var_mem.c > index 940ab6638823..139e16aad7c6 100644 > --- a/lib/efi_loader/efi_var_mem.c > +++ b/lib/efi_loader/efi_var_mem.c > @@ -232,8 +232,6 @@ efi_status_t efi_var_mem_init(void) > efi_var_buf->length = (uintptr_t)efi_var_buf->var - > (uintptr_t)efi_var_buf; > > - if (ret != EFI_SUCCESS) > - return ret; > ret = efi_create_event(EVT_SIGNAL_VIRTUAL_ADDRESS_CHANGE, TPL_CALLBACK, > efi_var_mem_notify_virtual_address_map, NULL, > NULL, &event);
diff --git a/lib/efi_loader/efi_var_mem.c b/lib/efi_loader/efi_var_mem.c index 940ab6638823..139e16aad7c6 100644 --- a/lib/efi_loader/efi_var_mem.c +++ b/lib/efi_loader/efi_var_mem.c @@ -232,8 +232,6 @@ efi_status_t efi_var_mem_init(void) efi_var_buf->length = (uintptr_t)efi_var_buf->var - (uintptr_t)efi_var_buf; - if (ret != EFI_SUCCESS) - return ret; ret = efi_create_event(EVT_SIGNAL_VIRTUAL_ADDRESS_CHANGE, TPL_CALLBACK, efi_var_mem_notify_virtual_address_map, NULL, NULL, &event);
The check of the return code is already done a few lines above. Although it doesn't cause any functional issues, remove the superfluous checks Addresses-Coverity-ID: 492766 Control flow issues (DEADCODE) Signed-off-by: Ilias Apalodimas <ilias.apalodimas@linaro.org> --- lib/efi_loader/efi_var_mem.c | 2 -- 1 file changed, 2 deletions(-)