I am new in the kernel-programming, so I would like to find out what coding style is more acceptable. For example, in case of the error handling which of the following is better?
This one:
/* some stuff */
if(error) {
/* error handling */
return -(errorcode);
}
/* normal actions */
or this one:
/* some stuff */
if(!error) {
/* normal actions */
} else {
/* error handling */
return -(errorcode);
}
Where can I find any document, that regards to kernel coding standard?