diff options
author | Per Åstrand <per.astrand@arm.com> | 2020-09-28 08:44:42 +0200 |
---|---|---|
committer | Per Åstrand <per.astrand@arm.com> | 2020-09-28 12:44:45 +0200 |
commit | c801901c992ca632a0beb1eeb78b42c910e2e0aa (patch) | |
tree | eb28f42a42916e31b4efe780df7c747523dc1840 /src/ethosu_device.c | |
parent | c6c1db160f8dbb817420d6bda906bc57a0defa2a (diff) | |
download | ethos-u-core-driver-c801901c992ca632a0beb1eeb78b42c910e2e0aa.tar.gz |
Don't use NULL for integer variables
Avoid using NULL to initialize and compare with for integer variables.
Change-Id: I1c370a9bb213dc93db845149d123915273411551
Diffstat (limited to 'src/ethosu_device.c')
-rw-r--r-- | src/ethosu_device.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/src/ethosu_device.c b/src/ethosu_device.c index ba7e0d5..973caad 100644 --- a/src/ethosu_device.c +++ b/src/ethosu_device.c @@ -531,7 +531,7 @@ enum ethosu_error_codes ethosu_set_clock_and_power(struct ethosu_device *dev, uint32_t ethosu_read_reg(struct ethosu_device *dev, uint32_t address) { #if !defined(ARM_NPU_STUB) - ASSERT(dev->base_address != NULL); + ASSERT(dev->base_address != 0); volatile uint32_t *reg = (uint32_t *)(uintptr_t)(dev->base_address + address); return *reg; @@ -546,7 +546,7 @@ uint32_t ethosu_read_reg(struct ethosu_device *dev, uint32_t address) void ethosu_write_reg(struct ethosu_device *dev, uint32_t address, uint32_t value) { #if !defined(ARM_NPU_STUB) - ASSERT(dev->base_address != NULL); + ASSERT(dev->base_address != 0); volatile uint32_t *reg = (uint32_t *)(uintptr_t)(dev->base_address + address); *reg = value; |