Message ID | 20201130125307.218258-6-mkl@pengutronix.de |
---|---|
State | New |
Headers | show |
Series | [net,1/5] can: m_can: tcan4x5x_can_probe(): fix error path: remove erroneous clk_disable_unprepare() | expand |
diff --git a/drivers/net/can/kvaser_pciefd.c b/drivers/net/can/kvaser_pciefd.c index 72acd1ba162d..43151dd6cb1c 100644 --- a/drivers/net/can/kvaser_pciefd.c +++ b/drivers/net/can/kvaser_pciefd.c @@ -692,8 +692,10 @@ static int kvaser_pciefd_open(struct net_device *netdev) return err; err = kvaser_pciefd_bus_on(can); - if (err) + if (err) { + close_candev(netdev); return err; + } return 0; }