sm8250-common: livedisplay: Drop unnecessary nullptr checks
* new operator would never return a nullptr. Change-Id: I3a34770d70b2da53ba3099fb7647991e5bde33b8
This commit is contained in:
parent
3210166b58
commit
761d8a9123
1 changed files with 3 additions and 23 deletions
|
@ -46,29 +46,9 @@ int main() {
|
||||||
LOG(INFO) << "LiveDisplay HAL service is starting.";
|
LOG(INFO) << "LiveDisplay HAL service is starting.";
|
||||||
|
|
||||||
std::shared_ptr<SDMController> controller = std::make_shared<SDMController>();
|
std::shared_ptr<SDMController> controller = std::make_shared<SDMController>();
|
||||||
sp<DisplayModes> dm;
|
sp<DisplayModes> dm = new DisplayModes();
|
||||||
sp<PictureAdjustment> pa;
|
sp<PictureAdjustment> pa = new PictureAdjustment(controller);
|
||||||
sp<SunlightEnhancement> se;
|
sp<SunlightEnhancement> se = new SunlightEnhancement();
|
||||||
|
|
||||||
dm = new DisplayModes();
|
|
||||||
if (dm == nullptr) {
|
|
||||||
LOG(ERROR) << "Can not create an instance of LiveDisplay HAL DisplayModes Iface, exiting.";
|
|
||||||
goto shutdown;
|
|
||||||
}
|
|
||||||
|
|
||||||
pa = new PictureAdjustment(controller);
|
|
||||||
if (pa == nullptr) {
|
|
||||||
LOG(ERROR) << "Can not create an instance of LiveDisplay HAL PictureAdjustment Iface, "
|
|
||||||
"exiting.";
|
|
||||||
goto shutdown;
|
|
||||||
}
|
|
||||||
|
|
||||||
se = new SunlightEnhancement();
|
|
||||||
if (se == nullptr) {
|
|
||||||
LOG(ERROR) << "Can not create an instance of LiveDisplay HAL SunlightEnhancement Iface, "
|
|
||||||
"exiting.";
|
|
||||||
goto shutdown;
|
|
||||||
}
|
|
||||||
|
|
||||||
configureRpcThreadpool(1, true /*callerWillJoin*/);
|
configureRpcThreadpool(1, true /*callerWillJoin*/);
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue