From: David Miller <davem@davemloft.net>
To: Woojung.Huh@microchip.com
Cc: netdev@vger.kernel.org, f.fainelli@gmail.com, andrew@lunn.ch,
UNGLinuxDriver@microchip.com
Subject: Re: [PATCH v3 net-next] lan78xx: Use irq_domain for phy interrupt from USB Int. EP
Date: Tue, 01 Nov 2016 12:03:22 -0400 (EDT) [thread overview]
Message-ID: <20161101.120322.716031785792281107.davem@davemloft.net> (raw)
In-Reply-To: <9235D6609DB808459E95D78E17F2E43D4095CACB@CHN-SV-EXMX02.mchp-main.com>
From: <Woojung.Huh@microchip.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.
next prev parent reply other threads:[~2016-11-01 16:03 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2016-10-31 21:44 [PATCH v3 net-next] lan78xx: Use irq_domain for phy interrupt from USB Int. EP Woojung.Huh
2016-11-01 16:03 ` David Miller [this message]
2016-11-01 17:07 ` Woojung.Huh
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20161101.120322.716031785792281107.davem@davemloft.net \
--to=davem@davemloft.net \
--cc=UNGLinuxDriver@microchip.com \
--cc=Woojung.Huh@microchip.com \
--cc=andrew@lunn.ch \
--cc=f.fainelli@gmail.com \
--cc=netdev@vger.kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).