[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
RE: KernelNewbies Wikki
Hi,
In the module registration function (loading) of the HelloDriverSource
http://wiki.kernelnewbies.org/wiki/HelloDriverSource
if the kmalloc fails for hello_msg, why do we need to release
the semaphore.This is the code snippet:
if (!hello_msg){
up(&hello_sem);
return -ENOMEM;
}
Till this point, the semaphore has not even been initialized.
Am I missing something.
Sanjay.
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
http://sanjayku.blogspot.com
>-----Original Message-----
>From: kernelnewbies-bounce@xxxxxxxxxxxx [mailto:kernelnewbies-
>bounce@xxxxxxxxxxxx] On Behalf Of Tyler
>Sent: Thursday, June 30, 2005 2:09 AM
>To: kernelnewbies@xxxxxxxxxxxx
>Subject: KernelNewbies Wikki
>
>Hi all,
>
>I've added a section in the kernel newbies wikki : the
>KernelCodeRepository :
>http://wiki.kernelnewbies.org/wiki/KernelCodeRepository
>Every user can add some kernel code, so everybody can read it, learn
>some new tricks and the users can also correct the code.
>This could be interesting.
>I've already posted 3 idiots modules.
>
>I've established some rules to post the code and correct it.
>
>Here are the rules to post :
> * add a line in the table of the modules with the appropriate values :
> o the wiki name (xxxSource)
> o author
> o description
> * you have to cost the code in Plain text (#FORMAT Plain)
>
>Here are the rules to correct :
> * the corrections must be made in italic
> * never delete a line in the code. only the administrator of the
>code can do that (the one who posted the patch).
>
>Any proposition for the rules ?
>
>And feel free to correct the mistakes on the new page, my english is poor.
>
>
>
>--
>Kernelnewbies: Help each other learn about the Linux kernel.
>Archive: http://mail.nl.linux.org/kernelnewbies/
>FAQ: http://kernelnewbies.org/faq/
--
Kernelnewbies: Help each other learn about the Linux kernel.
Archive: http://mail.nl.linux.org/kernelnewbies/
FAQ: http://kernelnewbies.org/faq/