On Tue. 19 May 2022 at 00:52, Oliver Hartkopp <socketcan@xxxxxxxxxxxx> wrote: > Since commit 30f3b42147ba6f ("can: mark led trigger as broken") the > CAN specific LED support was disabled and marked as BROKEN. As the common > LED support with CONFIG_LEDS_TRIGGER_NETDEV should to this work now the > code can be removed as preparation for a CAN netdevice Kconfig rework. > > Suggested-by: Vincent Mailhol <mailhol.vincent@xxxxxxxxxx> > Signed-off-by: Oliver Hartkopp <socketcan@xxxxxxxxxxxx> [...] > struct net_device *alloc_c_can_dev(int msg_obj_num) > { > @@ -1376,12 +1367,11 @@ int register_c_can_dev(struct net_device *dev) > dev->flags |= IFF_ECHO; /* we support local echo */ > dev->netdev_ops = &c_can_netdev_ops; > c_can_set_ethtool_ops(dev); > > err = register_candev(dev); > - if (!err) > - devm_can_led_init(dev); > + > return err; I think we can remove the variable err and simply do: return register_candev(dev); > } > EXPORT_SYMBOL_GPL(register_c_can_dev); [...] Yours sincerely, Vincent Mailhol