summaryrefslogtreecommitdiff
path: root/src/security/intel/stm
diff options
context:
space:
mode:
authorElyes Haouas <ehaouas@noos.fr>2022-09-13 09:56:22 +0200
committerFelix Held <felix-coreboot@felixheld.de>2022-09-15 13:02:33 +0000
commitaebccac7e10eb581e8e7d3354289cfed76860a3e (patch)
treeffb8e6a5bb256f8675e0496f27c6991c524d1e9b /src/security/intel/stm
parenta6b41f2fd05c61ea74bea4a40d02250e9b37bee0 (diff)
src/security: Use "if (!ptr)" in preference to "if (ptr == NULL)"
Signed-off-by: Elyes Haouas <ehaouas@noos.fr> Change-Id: I3def65c016015d8213824e6b8561d8a67b6d5cf0 Reviewed-on: https://review.coreboot.org/c/coreboot/+/67579 Tested-by: build bot (Jenkins) <no-reply@coreboot.org> Reviewed-by: Yu-Ping Wu <yupingso@google.com>
Diffstat (limited to 'src/security/intel/stm')
-rw-r--r--src/security/intel/stm/SmmStm.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/security/intel/stm/SmmStm.c b/src/security/intel/stm/SmmStm.c
index 4cb2d0126c..a062bda25b 100644
--- a/src/security/intel/stm/SmmStm.c
+++ b/src/security/intel/stm/SmmStm.c
@@ -481,7 +481,7 @@ int add_pi_resource(STM_RSC *resource_list, uint32_t num_entries)
if (resource_size == 0)
return -1; // INVALID_PARAMETER;
- if (m_stm_resources_ptr == NULL) {
+ if (!m_stm_resources_ptr) {
// Copy EndResource for initialization
m_stm_resources_ptr = stm_resource_heap;
@@ -522,7 +522,7 @@ int add_pi_resource(STM_RSC *resource_list, uint32_t num_entries)
*/
int32_t delete_pi_resource(STM_RSC *resource_list, uint32_t num_entries)
{
- if (resource_list != NULL) {
+ if (resource_list) {
// ASSERT (false);
return -1; // UNSUPPORTED;
}