procfs: fix error handling of proc_register()