diff --git a/frameworks/native/sensor/src/sensor_data_channel.cpp b/frameworks/native/sensor/src/sensor_data_channel.cpp index 1f466c9b17ab6be45c0872abce1cbab664da7c86..501a6d0e0b9fcb558548b99623f3824ff5cc23db 100644 --- a/frameworks/native/sensor/src/sensor_data_channel.cpp +++ b/frameworks/native/sensor/src/sensor_data_channel.cpp @@ -61,7 +61,6 @@ int32_t SensorDataChannel::InnerSensorDataChannel() auto myRunner = AppExecFwk::EventRunner::Create(true); CHKPR(myRunner, ERROR); eventHandler_ = std::make_shared(myRunner); - CHKPR(eventHandler_, ERROR); int32_t receiveFd = GetReceiveDataFd(); auto inResult = eventHandler_->AddFileDescriptorListener(receiveFd, AppExecFwk::FILE_DESCRIPTOR_INPUT_EVENT, listener); diff --git a/services/sensor/hdi_connection/interface/src/sensor_hdi_connection.cpp b/services/sensor/hdi_connection/interface/src/sensor_hdi_connection.cpp index 7f1ca5e6ec05f7cab4ee50810438a21a59a6b593..c2c6596f69a6eb2578c03cb28142976217ae3a07 100644 --- a/services/sensor/hdi_connection/interface/src/sensor_hdi_connection.cpp +++ b/services/sensor/hdi_connection/interface/src/sensor_hdi_connection.cpp @@ -29,7 +29,6 @@ constexpr HiLogLabel LABEL = { LOG_CORE, SENSOR_LOG_DOMAIN, "SensorHdiConnection int32_t SensorHdiConnection::ConnectHdi() { iSensorHdiConnection_ = std::make_unique(); - CHKPR(iSensorHdiConnection_, ERROR); int32_t ret = ConnectHdiService(); if (ret != ERR_OK) { SEN_HILOGE("connect hdi service failed, try to connect compatible connection"); diff --git a/utils/src/sensor.cpp b/utils/src/sensor.cpp index 69d5a5125575e16338362357dad6aa6d9b4a4ba6..29d847cd9f9808e5927ad51fa1a1efc8d2061443 100644 --- a/utils/src/sensor.cpp +++ b/utils/src/sensor.cpp @@ -230,8 +230,6 @@ bool Sensor::Marshalling(Parcel &parcel) const std::unique_ptr Sensor::Unmarshalling(Parcel &parcel) { auto sensor = std::make_unique(); - CHKPP(sensor); - if (!sensor->ReadFromParcel(parcel)) { SEN_HILOGE("ReadFromParcel is failed"); return nullptr;