lkml.org 
[lkml]   [2006]   [Apr]   [18]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
Patch in this message
/
From
SubjectRe: PATCH [3/3]: Provide generic backlight support in Toshiba ACPI driver
Date
-----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/
\
 
 \ /
  Last update: 2006-04-18 18:52    [W:0.020 / U:0.552 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site