Messages in this thread Patch in this message | | | From | Andrey Borzenkov <> | Subject | Re: PATCH [3/3]: Provide generic backlight support in Toshiba ACPI driver | Date | Tue, 18 Apr 2006 20:49:53 +0400 |
| |
-----BEGIN PGP SIGNED MESSAGE----- Hash: SHA1
> @@ -546,6 +591,12 @@ static int __init toshiba_acpi_init(void > remove_proc_entry(PROC_TOSHIBA, acpi_root_dir); > } > > + tosh_backlight_device = backlight_device_register ("tosh-bl", NULL, > + &toshbl_data); > + > + if (IS_ERR (tosh_backlight_device)) > + printk("Failed to register Toshiba backlight device\n"); > + > return (ACPI_SUCCESS(status)) ? 0 : -ENODEV; > } >
Should not this be
if (IS_ERR (tosh_backlight_device)) { printk("Failed to register Toshiba backlight device\n"); tosh_backlight_device = NULL; } > @@ -556,6 +607,8 @@ static void __exit toshiba_acpi_exit(voi > if (toshiba_proc_dir) > remove_proc_entry(PROC_TOSHIBA, acpi_root_dir); > > + backlight_device_unregister(tosh_backlight_device); > + > return; > }
What if it failed register before?
- -andrey -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.2.2 (GNU/Linux) iD8DBQFERRiyR6LMutpd94wRAgldAJ4mK7HeL0UUY29XewfrCODvfa3t7wCgqLN8 dPbb6SKWJrMdmO3s/o7Gnns= =JhuH -----END PGP SIGNATURE----- - To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/
| |