diff --git a/interfaces/kits/hyperaio/src/hyperaio.cpp b/interfaces/kits/hyperaio/src/hyperaio.cpp index 1f5dc006db5daa9b77efbde83ea1972fc9105c87..2df9dc050bbf414b70c8cb527526b0f101ce26e3 100644 --- a/interfaces/kits/hyperaio/src/hyperaio.cpp +++ b/interfaces/kits/hyperaio/src/hyperaio.cpp @@ -119,7 +119,12 @@ int32_t HyperAio::StartOpenReqs(OpenReqs *req) if (pImpl_ == nullptr) { return -EINVAL; } - if (req == nullptr || req->reqs == nullptr) { + if (req == nullptr) { + HILOGE("OpenReqs is null"); + return -EINVAL; + } + if (req->reqs == nullptr) { + HILOGE("OpenReqs->reqs is null"); return -EINVAL; } if (!initialized_.load()) { @@ -166,7 +171,12 @@ int32_t HyperAio::StartReadReqs(ReadReqs *req) if (pImpl_ == nullptr) { return -EINVAL; } - if (req == nullptr || req->reqs == nullptr) { + if (req == nullptr) { + HILOGE("ReadReqs is null"); + return -EINVAL; + } + if (req->reqs == nullptr) { + HILOGE("ReadReqs->reqs is null"); return -EINVAL; } if (!initialized_.load()) { @@ -212,7 +222,12 @@ int32_t HyperAio::StartCancelReqs(CancelReqs *req) if (pImpl_ == nullptr) { return -EINVAL; } - if (req == nullptr || req->reqs == nullptr) { + if (req == nullptr) { + HILOGE("CancelReqs is null"); + return -EINVAL; + } + if (req->reqs == nullptr) { + HILOGE("CancelReqs->reqs is null"); return -EINVAL; } if (!initialized_.load()) {