Re: KernelNewbies Wikki

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Sanjay Kumar, Noida a écrit :
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.

Hi,
you're right : the up(&hello_sem) has nothong to do here.
Thanks.


--
Kernelnewbies: Help each other learn about the Linux kernel.
Archive:       http://mail.nl.linux.org/kernelnewbies/
FAQ:           http://kernelnewbies.org/faq/


[Index of Archives]     [Newbies FAQ]     [Linux Kernel Mentors]     [Linux Kernel Development]     [IETF Annouce]     [Git]     [Networking]     [Security]     [Bugtraq]     [Yosemite]     [MIPS Linux]     [ARM Linux]     [Linux RAID]     [Linux SCSI]     [Linux ACPI]
  Powered by Linux