diff options
-rw-r--r-- | src/soc/mediatek/common/clkbuf.c | 4 | ||||
-rw-r--r-- | src/soc/mediatek/common/msdc.c | 2 | ||||
-rw-r--r-- | src/soc/mediatek/common/pmic_wrap.c | 2 | ||||
-rw-r--r-- | src/soc/mediatek/common/rtc_mt6359p.c | 4 | ||||
-rw-r--r-- | src/soc/mediatek/mt8192/srclken_rc.c | 2 |
5 files changed, 7 insertions, 7 deletions
diff --git a/src/soc/mediatek/common/clkbuf.c b/src/soc/mediatek/common/clkbuf.c index 735457122f..60f53a77b0 100644 --- a/src/soc/mediatek/common/clkbuf.c +++ b/src/soc/mediatek/common/clkbuf.c @@ -30,7 +30,7 @@ static u32 buf_read(u32 addr) { u32 rdata; - if (pmif_arb == NULL) + if (!pmif_arb) pmif_arb = get_pmif_controller(PMIF_SPI, 0); pmif_arb->read(pmif_arb, 0, addr, &rdata); @@ -39,7 +39,7 @@ static u32 buf_read(u32 addr) static void buf_write(u32 addr, u32 wdata) { - if (pmif_arb == NULL) + if (!pmif_arb) pmif_arb = get_pmif_controller(PMIF_SPI, 0); pmif_arb->write(pmif_arb, 0, addr, wdata); } diff --git a/src/soc/mediatek/common/msdc.c b/src/soc/mediatek/common/msdc.c index 6e0086ba75..c6f77abc5c 100644 --- a/src/soc/mediatek/common/msdc.c +++ b/src/soc/mediatek/common/msdc.c @@ -443,7 +443,7 @@ static void set_early_mmc_wake_status(int32_t status) ms_cbmem = cbmem_add(CBMEM_ID_MMC_STATUS, sizeof(status)); - if (ms_cbmem == NULL) { + if (!ms_cbmem) { printk(BIOS_ERR, "%s: Failed to add early mmc wake status to cbmem!\n", __func__); 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; } diff --git a/src/soc/mediatek/common/rtc_mt6359p.c b/src/soc/mediatek/common/rtc_mt6359p.c index 2b5611bb15..a930aacb87 100644 --- a/src/soc/mediatek/common/rtc_mt6359p.c +++ b/src/soc/mediatek/common/rtc_mt6359p.c @@ -15,7 +15,7 @@ void rtc_read(u16 addr, u16 *rdata) { u32 data; - if (pmif_arb == NULL) + if (!pmif_arb) pmif_arb = get_pmif_controller(PMIF_SPI, 0); pmif_arb->read(pmif_arb, 0, (u32)addr, &data); @@ -24,7 +24,7 @@ void rtc_read(u16 addr, u16 *rdata) void rtc_write(u16 addr, u16 wdata) { - if (pmif_arb == NULL) + if (!pmif_arb) pmif_arb = get_pmif_controller(PMIF_SPI, 0); pmif_arb->write(pmif_arb, 0, (unsigned int)addr, (unsigned int)wdata); } diff --git a/src/soc/mediatek/mt8192/srclken_rc.c b/src/soc/mediatek/mt8192/srclken_rc.c index f6790c6898..0c5b8896d9 100644 --- a/src/soc/mediatek/mt8192/srclken_rc.c +++ b/src/soc/mediatek/mt8192/srclken_rc.c @@ -118,7 +118,7 @@ static void pmic_read(u32 addr, u32 *rdata) { static struct pmif *pmif_arb; - if (pmif_arb == NULL) + if (!pmif_arb) pmif_arb = get_pmif_controller(PMIF_SPI, 0); pmif_arb->read(pmif_arb, 0, addr, rdata); |