mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Andrew Morton <akpm@osdl.org>
To: Martin Schwidefsky <schwidefsky@de.ibm.com>
Cc: cohuck@de.ibm.com, linux-kernel@vger.kernel.org
Subject: Re: [patch 14/17] s390: introduce struct channel_subsystem.
Date: Fri, 9 Dec 2005 23:52:25 -0800	[thread overview]
Message-ID: <20051209235225.3936c1a0.akpm@osdl.org> (raw)
In-Reply-To: <20051209152846.GO6532@skybase.boeblingen.de.ibm.com>

Martin Schwidefsky <schwidefsky@de.ibm.com> wrote:
>
> +	/* Setup css structure. */
>  +	for (i = 0; i <= __MAX_CSSID; i++) {
>  +		css[i] = kmalloc(sizeof(struct channel_subsystem), GFP_KERNEL);
>  +		if (!css[i]) {
>  +			ret = -ENOMEM;
>  +			goto out_bus;
>  +		}
>  +		setup_css(i);
>  +		ret = device_register(&css[i]->device);
>  +		if (ret)
>  +			goto out_free;
>  +	}
>   	css_init_done = 1;
>   
>   	ctl_set_bit(6, 28);
>   
>   	for_each_subchannel(__init_channel_subsystem, NULL);
>   	return 0;
>  +out_free:
>  +	kfree(css[i]);
>   out_bus:
>  +	while (i > 0) {
>  +		i--;
>  +		device_unregister(&css[i]->device);
>  +	}

I spy a memory leak.

  reply	other threads:[~2005-12-10  7:52 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2005-12-09 15:28 Martin Schwidefsky
2005-12-10  7:52 ` Andrew Morton [this message]
2005-12-10  9:25   ` Cornelia Huck

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=20051209235225.3936c1a0.akpm@osdl.org \
    --to=akpm@osdl.org \
    --cc=cohuck@de.ibm.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=schwidefsky@de.ibm.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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox

all inboxes | Powered by JetHome®