summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorRalf Kirchner <ralf.kirchner@embedded-brains.de>2014-04-30 10:13:07 +0200
committerSebastian Huber <sebastian.huber@embedded-brains.de>2014-04-30 14:53:17 +0200
commitb0e83e1207ea626242df3516f164cbb86e5bb047 (patch)
tree0fb50a8c3bea526f33d3d399742451d3b9ca6962
parent64bc102fbfd628347a38be679b61f4a576166c04 (diff)
downloadrtems-b0e83e1207ea626242df3516f164cbb86e5bb047.tar.bz2
libchip: Add asserts to dwmac driver
-rw-r--r--c/src/libchip/network/dwmac.c3
1 files changed, 3 insertions, 0 deletions
diff --git a/c/src/libchip/network/dwmac.c b/c/src/libchip/network/dwmac.c
index 0e2d1496f4..20d87dc83b 100644
--- a/c/src/libchip/network/dwmac.c
+++ b/c/src/libchip/network/dwmac.c
@@ -2024,6 +2024,7 @@ static int dwmac_if_clk_csr_set(
&& ( gmii_clk_rate < DWCGNAC3504_CSR_F_300M ) ) {
self->csr_clock = DWCGNAC3504_CSR_250_300M;
} else {
+ assert( gmii_clk_rate < DWCGNAC3504_CSR_F_300M );
eno = EINVAL;
}
@@ -2111,9 +2112,11 @@ static int dwmac_if_attach(
if ( eno == 0 ) {
self->dma_threshold_control = DWMAC_DMA_THRESHOLD_CONTROL_DEFAULT;
+ assert( driver_config->addr_gmac_regs != NULL );
if ( driver_config->addr_gmac_regs != NULL ) {
self->macgrp = driver_config->addr_gmac_regs;
+ assert( driver_config->addr_dma_regs != NULL );
if ( driver_config->addr_dma_regs != NULL ) {
self->dmagrp = driver_config->addr_dma_regs;
} else {