Skip to contentSkip to conversation

efifb: fix device unregister on error path

PATCH In review Konstantin Khlebnikov 2 participants 2 messages Jun 13, 2011 Framebuffer layer

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 efifb: fix device unregister on error path

Argument of platform_device_unregister() should be efifb_device, not efifb_driver. bug in v3.0-rc1-57-gbb8b266

---
 drivers/video/efifb.c |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)
drivers/video/efifb.c +1 -1
index 69c49df..784139a 100644
@@ -541,7 +541,7 @@ static int __init efifb_init(void)
 	 */
 	ret = platform_driver_probe(&efifb_driver, efifb_probe);
 	if (ret) {
-		platform_device_unregister(&efifb_driver);
+		platform_device_unregister(&efifb_device);
 		return ret;
 	}
 
#1 lore raw

Hi,

Quoted 13 lines · Konstantin Khlebnikov

Argument of platform_device_unregister() should be efifb_device, not efifb_driver. bug in v3.0-rc1-57-gbb8b266

---
 drivers/video/efifb.c |    2 +-

 1 files changed, 1 insertions(+), 1 deletions(-)
drivers/video/efifb.c +0 -0
index 69c49df..784139a 100644

drivers/video/efifb.c static int __init efifb_init(void) · line 546

Quoted 7 lines
drivers/video/efifb.c +1 -1
@@ -541,7 +541,7 @@ static int __init efifb_init(void)
         */
        ret = platform_driver_probe(&efifb_driver, efifb_probe);
        if (ret) {
-               platform_device_unregister(&efifb_driver);
+               platform_device_unregister(&efifb_device);
                return ret;
        }

The same issue is present in this thread:

https://lkml.org/lkml/2011/6/12/34