mirror of
https://github.com/BobTheBlinker/android_kernel_motorola_sm6375.git
synced 2026-10-30 03:27:44 -04:00
driver core/platform_device_add_resources: free resource 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]>
This commit is contained in:
parent
cea896238f
commit
4a03d6f7c8
1 changed files with 1 additions and 0 deletions
|
|
@ -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;
|
||||
|
|
|
|||
Loading…
Reference in a new issue