Merge "KillZramBackingDevice: Return immediately if backing_dev is none."
This commit is contained in:
commit
7e2d32bc06
1 changed files with 5 additions and 0 deletions
|
|
@ -478,6 +478,11 @@ static Result<void> KillZramBackingDevice() {
|
||||||
// cut the last "\n"
|
// cut the last "\n"
|
||||||
backing_dev.erase(backing_dev.length() - 1);
|
backing_dev.erase(backing_dev.length() - 1);
|
||||||
|
|
||||||
|
if (android::base::StartsWith(backing_dev, "none")) {
|
||||||
|
LOG(INFO) << "No zram backing device configured";
|
||||||
|
return {};
|
||||||
|
}
|
||||||
|
|
||||||
// shutdown zram handle
|
// shutdown zram handle
|
||||||
Timer swap_timer;
|
Timer swap_timer;
|
||||||
LOG(INFO) << "swapoff() start...";
|
LOG(INFO) << "swapoff() start...";
|
||||||
|
|
|
||||||
Loading…
Add table
Reference in a new issue