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:
cea8962
)
driver core/platform_device_add_resources: free resource before overwriting
author
Uwe Kleine-König
<u.kleine-koenig@pengutronix.de>
Wed, 20 Apr 2011 07:44:45 +0000
(09:44 +0200)
committer
Greg Kroah-Hartman
<gregkh@suse.de>
Sat, 23 Apr 2011 00:09:13 +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 667f282f8b7bfe08093a8fe668439442279f3357..7d4bdaf557cff469f0c8c1fd60cbeeeb7829790f 100644
(file)
--- a/
drivers/base/platform.c
+++ b/
drivers/base/platform.c
@@
-200,6
+200,7
@@
int platform_device_add_resources(struct platform_device *pdev,
return -ENOMEM;
}
+ kfree(pdev->resource);
pdev->resource = r;
pdev->num_resources = num;
return 0;