summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authoranil.hiranniah <anil.hiranniah@nxp.com>2020-03-23 08:37:06 +0000
committerAutomerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>2020-03-23 08:37:06 +0000
commit4fc3150d2b0d39395e85e3afc75b6afab6aa987b (patch)
treed8db3bd5ad0dc3f3d62136befbd474821ffb18c7
parent2339587c1b5248f2fdeb9c14c9059ff860a71f81 (diff)
parent3595523fd82105ebcf86a3611a46091f5fb1aa99 (diff)
downloadplatform_hardware_nxp_secure_element-4fc3150d2b0d39395e85e3afc75b6afab6aa987b.tar.gz
platform_hardware_nxp_secure_element-4fc3150d2b0d39395e85e3afc75b6afab6aa987b.tar.bz2
platform_hardware_nxp_secure_element-4fc3150d2b0d39395e85e3afc75b6afab6aa987b.zip
Fix warnings from static analysis tools am: 3595523fd8
Change-Id: I6e8d581a51631e54b1c19d4325a7c02a927c25e0
-rwxr-xr-xlibese-spi/p73/pal/spi/phNxpEsePal_spi.cpp10
1 files changed, 5 insertions, 5 deletions
diff --git a/libese-spi/p73/pal/spi/phNxpEsePal_spi.cpp b/libese-spi/p73/pal/spi/phNxpEsePal_spi.cpp
index 21057b6..cb2d4c5 100755
--- a/libese-spi/p73/pal/spi/phNxpEsePal_spi.cpp
+++ b/libese-spi/p73/pal/spi/phNxpEsePal_spi.cpp
@@ -89,6 +89,11 @@ void phPalEse_spi_close(void* pDevHandle) {
return;
}
ESESTATUS phNxpEse_spiIoctl(uint64_t ioctlType, void* p_data) {
+ if (!p_data) {
+ ALOGD_IF(ese_debug_enabled, "%s:p_data is null ioctltyp: %ld", __FUNCTION__,
+ (long)ioctlType);
+ return ESESTATUS_FAILED;
+ }
ese_nxp_IoctlInOutData_t* inpOutData = (ese_nxp_IoctlInOutData_t*)p_data;
rf_status = inpOutData->inp.data.nxpCmd.p_cmd[0];
if (rf_status == 1) {
@@ -99,11 +104,6 @@ ESESTATUS phNxpEse_spiIoctl(uint64_t ioctlType, void* p_data) {
ese_debug_enabled,
"******************RF IS OFF*************************************");
}
- if (p_data != NULL) {
- ALOGD_IF(ese_debug_enabled,
- "halimpl phNxpEse_spiIoctl p_data is not null ioctltyp: %ld",
- (long)ioctlType);
- }
return ESESTATUS_SUCCESS;
}