diff mbox series

Fix coverity #292175

Message ID 20200419193104.22351-1-sbabic@denx.de
State Accepted
Headers show
Series Fix coverity #292113 | expand

Commit Message

Stefano Babic April 19, 2020, 7:30 p.m. UTC
Signed-off-by: Stefano Babic <sbabic@denx.de>
---
 core/swupdate.c | 5 ++++-
 1 file changed, 4 insertions(+), 1 deletion(-)
diff mbox series

Patch

diff --git a/core/swupdate.c b/core/swupdate.c
index c749782..74dfbbe 100644
--- a/core/swupdate.c
+++ b/core/swupdate.c
@@ -431,7 +431,10 @@  static void create_directory(const char* path) {
 		ERROR("OOM: Directory %s not created", path);
 		return;
 	}
-	mkdir(dpath, 0777);
+	if (mkdir(dpath, 0777)) {
+		WARN("Directory %s cannot be created due to : %s",
+		     path, strerror(errno));
+	}
 	free(dpath);
 }