[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <9235D6609DB808459E95D78E17F2E43D4095D227@CHN-SV-EXMX02.mchp-main.com>
Date: Tue, 1 Nov 2016 17:07:17 +0000
From: <Woojung.Huh@...rochip.com>
To: <davem@...emloft.net>
CC: <netdev@...r.kernel.org>, <f.fainelli@...il.com>, <andrew@...n.ch>,
<UNGLinuxDriver@...rochip.com>
Subject: RE: [PATCH v3 net-next] lan78xx: Use irq_domain for phy interrupt
from USB Int. EP
> > @@ -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
Powered by blists - more mailing lists