File tree Expand file tree Collapse file tree 1 file changed +3
-13
lines changed Expand file tree Collapse file tree 1 file changed +3
-13
lines changed Original file line number Diff line number Diff line change @@ -875,19 +875,11 @@ static void RISAF_Config(void)
875
875
876
876
static int eth_initialize (const struct device * dev )
877
877
{
878
- struct eth_stm32_hal_dev_data * dev_data ;
879
- const struct eth_stm32_hal_dev_cfg * cfg ;
880
- ETH_HandleTypeDef * heth ;
878
+ struct eth_stm32_hal_dev_data * dev_data = dev -> data ;
879
+ const struct eth_stm32_hal_dev_cfg * cfg = dev -> config ;
880
+ ETH_HandleTypeDef * heth = & dev_data -> heth ;
881
881
int ret = 0 ;
882
882
883
- __ASSERT_NO_MSG (dev != NULL );
884
-
885
- dev_data = dev -> data ;
886
- cfg = dev -> config ;
887
-
888
- __ASSERT_NO_MSG (dev_data != NULL );
889
- __ASSERT_NO_MSG (cfg != NULL );
890
-
891
883
if (!device_is_ready (DEVICE_DT_GET (STM32_CLOCK_CONTROL_NODE ))) {
892
884
LOG_ERR ("clock control device not ready" );
893
885
return - ENODEV ;
@@ -922,8 +914,6 @@ static int eth_initialize(const struct device *dev)
922
914
return ret ;
923
915
}
924
916
925
- heth = & dev_data -> heth ;
926
-
927
917
generate_mac (dev_data -> mac_addr );
928
918
929
919
heth -> Init .MACAddr = dev_data -> mac_addr ;
You can’t perform that action at this time.
0 commit comments