soc: qcom: Do not clear segments if pil boot failed in memory allocation

PIL boot failure if happened due to memory allocation failure then skip
clearing segments as there is nothing loaded in fw region.

Change-Id: If0c09dd47941be0d9fe42496db43365ece32f3e9
Signed-off-by: Avaneesh Kumar Dwivedi <akdwived@codeaurora.org>
This commit is contained in:
Avaneesh Kumar Dwivedi 2017-03-20 15:53:15 +05:30
parent 891e794f28
commit 60e059d220

View file

@ -920,7 +920,7 @@ out:
&desc->attrs);
priv->region = NULL;
}
if (desc->clear_fw_region)
if (desc->clear_fw_region && priv->region_start)
pil_clear_segment(desc);
pil_release_mmap(desc);
}