kernel loader: don't try to reload modules already loaded by init
Change-Id: I58fb2ee369bdb9f5c5f9e6c8ea3f15781ae60ece
diff --git a/twrp-functions.cpp b/twrp-functions.cpp
index 0f7ebb3..782afe1 100755
--- a/twrp-functions.cpp
+++ b/twrp-functions.cpp
@@ -709,10 +709,7 @@
std::ifstream srcfile(src.c_str(), ios::binary);
std::ofstream dstfile(dst.c_str(), ios::binary);
dstfile << srcfile.rdbuf();
- if (!dstfile.bad()) {
- LOGINFO("Copied file %s to %s\n", src.c_str(), dst.c_str());
- }
- else {
+ if (dstfile.bad()) {
LOGINFO("Unable to copy file %s to %s\n", src.c_str(), dst.c_str());
return -1;
}