Commit ce641b88 authored by Chris Wilson's avatar Chris Wilson Committed by Linus Torvalds

[PATCH] drivers_sgi_char_usema.c misc_register patch

  As part of my work on the Linux Kernel Janitors project, cleaning up on
  functions which call misc_register and don't check for an error
  return, I would like to submit my patch to drivers/sgi/char/usema.c

  This module did not check the return code of misc_register. I found Uttam
  Pawar's patch for this on GeoCrawler
  (http://www.geocrawler.com/archives/3/9221/2002/8/0/9246517/), but it
  doesn't appear to have been applied. This patch basically does exactly the
  same as his, so all credit is due to him.
parent 90e34891
......@@ -176,9 +176,12 @@ static struct miscdevice dev_usemaclone = {
void
usema_init(void)
{
if (misc_register(&dev_usemaclone) < 0) {
printk(KERN_ERR "usemaclone: cannot register misc device.\n");
return;
}
printk("usemaclone misc device registered (minor: %d)\n",
SGI_USEMACLONE);
misc_register(&dev_usemaclone);
}
EXPORT_SYMBOL(usema_init);
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment