Commit 9bd253df authored by Michael Still's avatar Michael Still Committed by Linus Torvalds

[PATCH] misc_register-029-004

parent f1e747ff
......@@ -196,8 +196,17 @@ static struct miscdevice rtc_dev=
static int __init rtc_init(void)
{
misc_register(&rtc_dev);
create_proc_read_entry ("driver/rtc", 0, 0, rtc_read_proc, NULL);
int retval;
retval = misc_register(&rtc_dev);
if(retval < 0)
return retval;
#ifdef CONFIG_PROC_FS
if(create_proc_read_entry ("driver/rtc", 0, 0, rtc_read_proc, NULL) == NULL)
misc_deregister(&rtc_dev);
return -ENOMEM;
#endif
printk(KERN_INFO "i/pSeries Real Time Clock Driver v" RTC_VERSION "\n");
......
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