All of lore.kernel.org
 help / color / mirror / Atom feed
From: Sergei Shtylyov <sergei.shtylyov@cogentembedded.com>
To: Neil Armstrong <narmstrong@baylibre.com>,
	"David S. Miller" <davem@davemloft.net>,
	Florian Fainelli <f.fainelli@gmail.com>,
	Guenter Roeck <linux@roeck-us.net>,
	vivien.didelot@savoirfairelinux.com, Andrew Lunn <andrew@lunn.ch>,
	Fabian Frederick <fabf@skynet.be>,
	Pavel Nakonechny <pavel.nakonechny@skitlab.ru>,
	Joe Perches <joe@perches.com>,
	netdev@vger.kernel.org, linux-kernel@vger.kernel.org,
	nbd@openwrt.org
Subject: Re: [PATCH v2 1/5] net: dsa: add missing kfree on remove
Date: Sat, 3 Oct 2015 17:33:21 +0300	[thread overview]
Message-ID: <560FE731.6050600@cogentembedded.com> (raw)
In-Reply-To: <560FE575.7000003@baylibre.com>

Hello.

On 10/3/2015 5:25 PM, Neil Armstrong wrote:

> To prevent memory leakage on unbinding, add missing kfree calls.
>
> Signed-off-by: Neil Armstrong <narmstrong@baylibre.com>
> ---
>   net/dsa/dsa.c | 5 ++++-
>   1 file changed, 4 insertions(+), 1 deletion(-)
>
> diff --git a/net/dsa/dsa.c b/net/dsa/dsa.c
> index c59fa5d..12cec40 100644
> --- a/net/dsa/dsa.c
> +++ b/net/dsa/dsa.c
> @@ -914,8 +914,10 @@ static void dsa_remove_dst(struct dsa_switch_tree *dst)
>   	for (i = 0; i < dst->pd->nr_chips; i++) {
>   		struct dsa_switch *ds = dst->ds[i];
>
> -		if (ds != NULL)
> +		if (ds != NULL) {

    Didn;t scripts/checkpatch.pl complain here? just if (ds) is preferred in 
the networking code.

MBR, Sergei


  reply	other threads:[~2015-10-03 14:33 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-10-03 14:25 [PATCH v2 1/5] net: dsa: add missing kfree on remove Neil Armstrong
2015-10-03 14:33 ` Sergei Shtylyov [this message]
2015-10-03 15:20   ` Neil Armstrong
2015-10-03 21:54     ` Sergei Shtylyov
2015-10-06  7:25       ` Neil Armstrong
2015-10-06 11:15         ` Sergei Shtylyov

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=560FE731.6050600@cogentembedded.com \
    --to=sergei.shtylyov@cogentembedded.com \
    --cc=andrew@lunn.ch \
    --cc=davem@davemloft.net \
    --cc=f.fainelli@gmail.com \
    --cc=fabf@skynet.be \
    --cc=joe@perches.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux@roeck-us.net \
    --cc=narmstrong@baylibre.com \
    --cc=nbd@openwrt.org \
    --cc=netdev@vger.kernel.org \
    --cc=pavel.nakonechny@skitlab.ru \
    --cc=vivien.didelot@savoirfairelinux.com \
    /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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.