From 761d8a91239a067dbf3489034b031eb16ab08e8b Mon Sep 17 00:00:00 2001 From: LuK1337 Date: Fri, 26 Jun 2020 10:13:55 +0200 Subject: [PATCH] sm8250-common: livedisplay: Drop unnecessary nullptr checks * new operator would never return a nullptr. Change-Id: I3a34770d70b2da53ba3099fb7647991e5bde33b8 --- livedisplay/service.cpp | 26 +++----------------------- 1 file changed, 3 insertions(+), 23 deletions(-) diff --git a/livedisplay/service.cpp b/livedisplay/service.cpp index d9ae82a..d040c88 100644 --- a/livedisplay/service.cpp +++ b/livedisplay/service.cpp @@ -46,29 +46,9 @@ int main() { LOG(INFO) << "LiveDisplay HAL service is starting."; std::shared_ptr controller = std::make_shared(); - sp dm; - sp pa; - sp se; - - 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; - } + sp dm = new DisplayModes(); + sp pa = new PictureAdjustment(controller); + sp se = new SunlightEnhancement(); configureRpcThreadpool(1, true /*callerWillJoin*/);