Thread (20 messages) flat view 20 messages, 4 authors, 2007-10-09

Re: [PATCH 6/6] Xilinxfb: add of_platform bus binding

From: "Akinobu Mita" <akinobu.mita@gmail.com>
Date: 2007-10-01 16:42:37
Also in: lkml

2007/10/2, Grant Likely [off-list ref]:
 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;

quoted hunk ↗ jump to hunk
 }
@@ -398,6 +482,7 @@ static void __exit
 xilinxfb_cleanup(void)
 {
        platform_driver_unregister(&xilinxfb_platform_driver);
+       xilinxfb_of_unregister();
 }
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help