The patch titled
     depca.c: fix handling of platorm_device_add() failure
has been removed from the -mm tree.  Its filename was
     depcac-fix-handling-of-platorm_device_add-failure.patch

This patch was dropped because it was merged into mainline or a subsystem tree

------------------------------------------------------
Subject: depca.c: fix handling of platorm_device_add() failure
From: Andrea Righi <[EMAIL PROTECTED]>

Fix a bug in depca_platform_probe().

We don't use a dynamic pointer for pldev->dev.platform_data, so it seems
that the correct way to proceed if platform_device_add(pldev) fails is to
explicitly set the pldev->dev.platform_data pointer to NULL, before calling
the platform_device_put(pldev), or it will be kfree'ed by
platform_device_release().

This will cause double-kfree if the driver is loaded when the hardware is not
present.

Cc: Jeff Garzik <[EMAIL PROTECTED]>
Cc: Greg KH <[EMAIL PROTECTED]>
Signed-off-by: Andrew Morton <[EMAIL PROTECTED]>
---

 drivers/net/depca.c |    3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff -puN drivers/net/depca.c~depcac-fix-handling-of-platorm_device_add-failure 
drivers/net/depca.c
--- a/drivers/net/depca.c~depcac-fix-handling-of-platorm_device_add-failure
+++ a/drivers/net/depca.c
@@ -1490,8 +1490,9 @@ static void __init depca_platform_probe 
                depca_io_ports[i].device = pldev;
 
                if (platform_device_add(pldev)) {
-                       platform_device_put(pldev);
                        depca_io_ports[i].device = NULL;
+                       pldev->dev.platform_data = NULL;
+                       platform_device_put(pldev);
                        continue;
                }
 
_

Patches currently in -mm which might be from [EMAIL PROTECTED] are

origin.patch

-
To unsubscribe from this list: send the line "unsubscribe mm-commits" in
the body of a message to [EMAIL PROTECTED]
More majordomo info at  http://vger.kernel.org/majordomo-info.html

Reply via email to