projects
/
firefly-linux-kernel-4.4.55.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
27a33f9
)
driver core/platform_device_add_data: free platform data before overwriting
author
Uwe Kleine-König
<u.kleine-koenig@pengutronix.de>
Wed, 20 Apr 2011 07:44:43 +0000
(09:44 +0200)
committer
Greg Kroah-Hartman
<gregkh@suse.de>
Sat, 23 Apr 2011 00:09:12 +0000
(17:09 -0700)
Reviewed-by: Viresh Kumar <viresh.kumar@st.com>
Signed-off-by: Uwe Kleine-König <u.kleine-koenig@pengutronix.de>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
drivers/base/platform.c
patch
|
blob
|
history
diff --git
a/drivers/base/platform.c
b/drivers/base/platform.c
index 65cb4c3976030d9ca50485c11a2d0fcff0118bf3..58ad8e8ad7a360c5d8bd17a62fe17579ca943878 100644
(file)
--- a/
drivers/base/platform.c
+++ b/
drivers/base/platform.c
@@
-228,6
+228,7
@@
int platform_device_add_data(struct platform_device *pdev, const void *data,
return -ENOMEM;
}
+ kfree(pdev->dev.platform_data);
pdev->dev.platform_data = d;
return 0;
}