commit | 251e031d132ea3d03e0a32f2240c67f449979c5d | [log] [tgz] |
---|---|---|
author | Uwe Kleine-König <[email protected]> | Wed Apr 20 09:44:43 2011 +0200 |
committer | Greg Kroah-Hartman <[email protected]> | Fri Apr 22 17:09:12 2011 -0700 |
tree | 83ee22c8d152196875959a58c3e5fb99544468e4 | |
parent | 27a33f9e8fb203e71925257cf039fe6ec623c5d1 [diff] [blame] |
driver core/platform_device_add_data: free platform data before overwriting Reviewed-by: Viresh Kumar <[email protected]> Signed-off-by: Uwe Kleine-König <[email protected]> Signed-off-by: Greg Kroah-Hartman <[email protected]>
diff --git a/drivers/base/platform.c b/drivers/base/platform.c index 65cb4c3..58ad8e8 100644 --- a/drivers/base/platform.c +++ b/drivers/base/platform.c
@@ -228,6 +228,7 @@ return -ENOMEM; } + kfree(pdev->dev.platform_data); pdev->dev.platform_data = d; return 0; }