linux-fbdev.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] EFIFB: Fix error handling
@ 2011-06-15  0:38 David Howells
  2011-06-15  2:37 ` Paul Mundt
  0 siblings, 1 reply; 2+ messages in thread
From: David Howells @ 2011-06-15  0:38 UTC (permalink / raw)
  To: pjones; +Cc: akpm, linux-kernel, David Howells, linux-fbdev, stable

Fix the error handling in the EFIFB driver if platform_driver_probe() fails.
In that case, the code will pass the driver struct to the _device_
unregistration function.  It presumably should pass a pointer to the device
struct instead.

The compiler gives the following warning to indicate this:

drivers/video/efifb.c: In function 'efifb_init':
drivers/video/efifb.c:544:3: warning: passing argument 1 of 'platform_device_unregister' from incompatible pointer type
include/linux/platform_device.h:40:13: note: expected 'struct platform_device *' but argument is of type 'struct platform_driver *'

Signed-off-by: David Howells <dhowells@redhat.com>
cc: Peter Jones <pjones@redhat.com>
cc: linux-fbdev@vger.kernel.org
cc: stable@kernel.org
---

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

diff --git a/drivers/video/efifb.c b/drivers/video/efifb.c
index 69c49df..784139a 100644
--- a/drivers/video/efifb.c
+++ b/drivers/video/efifb.c
@@ -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;
 	}
 


^ permalink raw reply related	[flat|nested] 2+ messages in thread

* Re: [PATCH] EFIFB: Fix error handling
  2011-06-15  0:38 [PATCH] EFIFB: Fix error handling David Howells
@ 2011-06-15  2:37 ` Paul Mundt
  0 siblings, 0 replies; 2+ messages in thread
From: Paul Mundt @ 2011-06-15  2:37 UTC (permalink / raw)
  To: David Howells; +Cc: pjones, akpm, linux-kernel, linux-fbdev, stable

On Wed, Jun 15, 2011 at 01:38:17AM +0100, David Howells wrote:
> Fix the error handling in the EFIFB driver if platform_driver_probe() fails.
> In that case, the code will pass the driver struct to the _device_
> unregistration function.  It presumably should pass a pointer to the device
> struct instead.
> 
> The compiler gives the following warning to indicate this:
> 
> drivers/video/efifb.c: In function 'efifb_init':
> drivers/video/efifb.c:544:3: warning: passing argument 1 of 'platform_device_unregister' from incompatible pointer type
> include/linux/platform_device.h:40:13: note: expected 'struct platform_device *' but argument is of type 'struct platform_driver *'
> 
> Signed-off-by: David Howells <dhowells@redhat.com>
> cc: Peter Jones <pjones@redhat.com>
> cc: linux-fbdev@vger.kernel.org
> cc: stable@kernel.org

Thanks, I've already queued a fix for this.

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2011-06-15  2:37 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2011-06-15  0:38 [PATCH] EFIFB: Fix error handling David Howells
2011-06-15  2:37 ` Paul Mundt

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).