lkml.org 
[lkml]   [2007]   [Oct]   [1]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [PATCH 6/6] Xilinxfb: add of_platform bus binding
2007/10/2, Grant Likely <grant.likely@secretlab.ca>:

> static int __init
> xilinxfb_init(void)
> {
> - /*
> - * No kernel boot options used,
> - * so we just need to register the driver
> - */
> + int rc;
> + rc = xilinxfb_of_register();
> + if (rc)
> + return rc;
> +
> return platform_driver_register(&xilinxfb_platform_driver);

Is it better to add error handling for platform_driver_register()?

rc = platform_driver_register(&xilinxfb_platform_driver);
if (rc)
xilinxfb_of_unregister();
return rc;


> }
>
> @@ -398,6 +482,7 @@ static void __exit
> xilinxfb_cleanup(void)
> {
> platform_driver_unregister(&xilinxfb_platform_driver);
> + xilinxfb_of_unregister();
> }
-
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: 2007-10-01 18:45    [W:0.177 / U:0.364 seconds]
©2003-2011 Jasper Spaans. Advertise on this site