[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-Id: <20161101.120322.716031785792281107.davem@davemloft.net>
Date: Tue, 01 Nov 2016 12:03:22 -0400 (EDT)
From: David Miller <davem@...emloft.net>
To: Woojung.Huh@...rochip.com
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
From: <Woojung.Huh@...rochip.com>
Date: Mon, 31 Oct 2016 21:44:37 +0000
> @@ -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.
Powered by blists - more mailing lists