Browse Source

Fix coverity #293503 and #293507

Signed-off-by: Stefano Babic <sbabic@denx.de>
pull/8/head
Stefano Babic 4 years ago
parent
commit
69a6819c02
  1. 4
      src/uboot_env.c

4
src/uboot_env.c

@ -1371,7 +1371,7 @@ int libuboot_initialize(struct uboot_ctx **out,
}
int libuboot_open(struct uboot_ctx *ctx) {
if (!ctx || !ctx->envdevs)
if (!ctx)
return -EINVAL;
libuboot_lock(ctx);
@ -1381,7 +1381,7 @@ int libuboot_open(struct uboot_ctx *ctx) {
void libuboot_close(struct uboot_ctx *ctx) {
struct var_entry *e, *tmp;
if (!ctx || !ctx->envdevs)
if (!ctx)
return;
ctx->valid = false;
libuboot_unlock(ctx);

Loading…
Cancel
Save