Don't recalculate an available pointer.

Signed-off-by: Guennadi Liakhovetski <[email protected]>
---
diff --git a/drivers/base/platform.c b/drivers/base/platform.c
index a1a7225..efe9aa9 100644
--- a/drivers/base/platform.c
+++ b/drivers/base/platform.c
@@ -166,8 +166,8 @@ static void platform_device_release(struct device *dev)
        struct platform_object *pa = container_of(dev, struct platform_object,
                                                  pdev.dev);
 
-       of_device_node_put(&pa->pdev.dev);
-       kfree(pa->pdev.dev.platform_data);
+       of_device_node_put(dev);
+       kfree(dev->platform_data);
        kfree(pa->pdev.mfd_cell);
        kfree(pa->pdev.resource);
        kfree(pa);
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to [email protected]
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

Reply via email to