All of lore.kernel.org
 help / color / mirror / Atom feed
From: shaw@vranix.com
To: Evgeniy Polyakov <johnpol@2ka.mipt.ru>
Cc: lkml <linux-kernel@vger.kernel.org>,
	David Miller <davem@davemloft.net>,
	Ulrich Drepper <drepper@redhat.com>,
	Andrew Morton <akpm@osdl.org>, netdev <netdev@vger.kernel.org>,
	Zach Brown <zach.brown@oracle.com>,
	Christoph Hellwig <hch@infradead.org>,
	Chase Venters <chase.venters@clientec.com>,
	Johann Borck <johann.borck@densedata.com>
Subject: Re: [take17 1/4] kevent: Core files.
Date: Thu, 7 Sep 2006 21:05:16 -0700	[thread overview]
Message-ID: <200609072105.16061.shaw@vranix.com> (raw)
In-Reply-To: <1157623151215@2ka.mipt.ru>

> +static int __devinit kevent_user_init(void)
> +{
> +	int err = 0;
> +
> +	kevent_cache = kmem_cache_create("kevent_cache",
> +			sizeof(struct kevent), 0, SLAB_PANIC, NULL, NULL);
> +
> +	err = misc_register(&kevent_miscdev);
> +	if (err) {
> +		printk(KERN_ERR "Failed to register kevent miscdev: err=%d.\n", err);
> +		goto err_out_exit;
> +	}
> +
> +	printk("KEVENT subsystem has been successfully registered.\n");
> +
> +	return 0;
> +
> +err_out_exit:
> +	kmem_cache_destroy(kevent_cache);
> +	return err;
> +}

It's probably best to treat kmem_cache_create like a black box and check for 
it returning null.

Thanks,
Shaw

  parent reply	other threads:[~2006-09-08  4:05 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
     [not found] <1qwel34p2jrwe5.GA1898@2ka.mipt.ru>
2006-09-07  9:57 ` [take17 0/4] kevent: Generic event handling mechanism Evgeniy Polyakov
2006-09-07  9:59   ` [take17 1/4] kevent: Core files Evgeniy Polyakov
2006-09-07  9:59     ` [take17 2/4] kevent: poll/select() notifications Evgeniy Polyakov
2006-09-07  9:59       ` [take17 3/4] kevent: Socket notifications Evgeniy Polyakov
2006-09-07  9:59         ` [take17 4/4] kevent: Timer notifications Evgeniy Polyakov
2006-09-08  4:05     ` shaw [this message]
2006-09-08  6:38       ` [take17 1/4] kevent: Core files Evgeniy Polyakov
2006-09-08 17:06         ` shawvrana

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=200609072105.16061.shaw@vranix.com \
    --to=shaw@vranix.com \
    --cc=akpm@osdl.org \
    --cc=chase.venters@clientec.com \
    --cc=davem@davemloft.net \
    --cc=drepper@redhat.com \
    --cc=hch@infradead.org \
    --cc=johann.borck@densedata.com \
    --cc=johnpol@2ka.mipt.ru \
    --cc=linux-kernel@vger.kernel.org \
    --cc=netdev@vger.kernel.org \
    --cc=zach.brown@oracle.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.