> > @@ -2668,6 +2821,13 @@ static int lan78xx_bind(struct lan78xx_net *dev, > struct usb_interface *intf) > > > > dev->net->hw_features = dev->net->features; > > > > + ret = lan78xx_setup_irq_domain(dev); > > + if (ret < 0) { > > + netdev_warn(dev->net, > > + "lan78xx_setup_irq_domain() failed : %d", ret); > > + return ret; > > + } > > + > > This error path leaks the memory allocated at the beginning of this function. > > That would normally be freed up by lan78xx_unbind() but the caller will not > invoke that if lan78xx_bind() fails so you have to take care of the kfree > here.
David, Thanks for review and finding. Will fix and post new patch. - Woojung