summaryrefslogtreecommitdiff
path: root/src/soc/mediatek/common/pmic_wrap.c
diff options
context:
space:
mode:
authorElyes Haouas <ehaouas@noos.fr>2022-09-13 09:57:30 +0200
committerFelix Held <felix-coreboot@felixheld.de>2022-09-14 12:49:44 +0000
commit0f1fb8a8685148e2bad299285a62e98a59c9f9b4 (patch)
treeae063e5ed4af95cfab56858a1a4eb981e214824a /src/soc/mediatek/common/pmic_wrap.c
parent5e6b0f0cac4ba5cde6114325ea69ec0e98c7e08f (diff)
soc/mediatek: Use "if (!ptr)" in preference to "if (ptr == NULL)"
Signed-off-by: Elyes Haouas <ehaouas@noos.fr> Change-Id: I9cf4097518034fa4c3ae1899840ae3a276936f80 Reviewed-on: https://review.coreboot.org/c/coreboot/+/67581 Reviewed-by: Hung-Te Lin <hungte@chromium.org> Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Diffstat (limited to 'src/soc/mediatek/common/pmic_wrap.c')
-rw-r--r--src/soc/mediatek/common/pmic_wrap.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/soc/mediatek/common/pmic_wrap.c b/src/soc/mediatek/common/pmic_wrap.c
index d732994e4b..45db8b05db 100644
--- a/src/soc/mediatek/common/pmic_wrap.c
+++ b/src/soc/mediatek/common/pmic_wrap.c
@@ -135,7 +135,7 @@ s32 pwrap_wacs2(u32 write, u16 addr, u16 wdata, u16 *rdata, u32 init_check)
write32(&mtk_pwrap->wacs2_cmd, wacs_cmd);
if (write == 0) {
- if (rdata == NULL) {
+ if (!rdata) {
pwrap_err("rdata is a NULL pointer\n");
return E_PWR_INVALID_ARG;
}