diff mbox series

[libubootenv] Fix coverity #293503 and #293507

Message ID 20200628151826.952807-1-sbabic@denx.de
State Accepted
Headers show
Series [libubootenv] Fix coverity #293503 and #293507 | expand

Commit Message

Stefano Babic June 28, 2020, 3:18 p.m. UTC
Signed-off-by: Stefano Babic <sbabic@denx.de>
---
 src/uboot_env.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)
diff mbox series

Patch

diff --git a/src/uboot_env.c b/src/uboot_env.c
index 637b61d..8917513 100644
--- a/src/uboot_env.c
+++ b/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);