Skip to contentSkip to conversation

efifb: Fix call to wrong unregister function

PATCH wanlong.gao 4 participants 6 messages Jun 12, 2011 – Jun 14, 2011 Framebuffer layer

lore
Share & tools
lore
#0 lore raw

<snip>

Hi Maarten:
It registered efifb_device but try to unregistered efifb_driver, so I think you should fix it like this?

---
 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;
 	}
 
Signature · 1 line
1.7.4.1
#1 lore raw

Hey,

2011/6/12 wanlong.gao <[email protected]>:

Quoted 5 lines

<snip>

Hi Maarten:
It registered efifb_device but try to unregistered efifb_driver, so I think you should fix it like this?

Ah yes, that seems to be the correct one, platform_driver_register was removed. Not 100% sure if acked by or signed-off-by is appropriate here.

~Maarten

#2 lore raw
Quoted 11 lines · Maarten Lankhorst

Hey,

2011/6/12 wanlong.gao <[email protected]>:

Quoted 5 lines

<snip>

Hi Maarten:
It registered efifb_device but try to unregistered efifb_driver, so I think you should fix it like this?

Ah yes, that seems to be the correct one, platform_driver_register was removed. Not 100% sure if acked by or signed-off-by is appropriate here.

I think signed-off-by is OK.

Quoted 4 lines

~Maarten

#3 lore raw
In reply to wanlong.gao
Quoted 16 lines · wanlong.gao

<snip>

Hi Maarten:
It registered efifb_device but try to unregistered efifb_driver, so I think you should fix it like this?

---
  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 547

Quoted 8 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;
  	}
 

That's my bug. Sorry. I'm not sure why it compiled, though.

--Andy

#4 lore raw

Hi Andy,

2011/6/13 Andy Lutomirski <[email protected]>:

Quoted 29 lines · wanlong.gao
Quoted 17 lines

<snip>

Hi Maarten:
It registered efifb_device but try to unregistered efifb_driver, so I think you should fix it like this?

---
 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 547

Quoted 8 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;
        }
 
Quoted 1 line

That's my bug.  Sorry.  I'm not sure why it compiled, though.

It compiled, but threw a warning. :)

~Maarten

#5 lore raw
In reply to Andy Lutomirski
Quoted 12 lines · Andy Lutomirski
Quoted 11 lines · wanlong.gao

<snip>

Hi Maarten:
It registered efifb_device but try to unregistered efifb_driver, so I think you should fix it like this?

---
 drivers/video/efifb.c |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)
Quoted 16 lines

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

Quoted 13 lines
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;
 	}
 

Updated version applied, thanks.