diff --git a/drivers/can/kvaser_pci.c b/drivers/can/kvaser_pci.c index 1cd70eaa1e5..7e2760f54f8 100644 --- a/drivers/can/kvaser_pci.c +++ b/drivers/can/kvaser_pci.c @@ -1665,12 +1665,6 @@ static int kvaser_probe(FAR struct pci_device_s *dev) netdev->quota[NETPKT_RX] = KVASER_RX_QUOTA; netdev->ops = &g_kvaser_net_ops; - /* Put the interface in the down state. This usually amounts to - * resetting the device and/or calling kvaser_sock_ifdown(). - */ - - kvaser_sock_ifdown(&priv->sja[i].dev); - /* Register the network interface. */ ret = netdev_lower_register(netdev, NET_LL_CAN); @@ -1679,6 +1673,12 @@ static int kvaser_probe(FAR struct pci_device_s *dev) pcierr("ERROR: failed to register count=%d, %d\n", i, ret); goto errout; } + + /* Put the interface in the down state. This usually amounts to + * resetting the device and/or calling kvaser_sock_ifdown(). + */ + + kvaser_sock_ifdown(&priv->sja[i].dev); #endif }