driver core/platform_device_add_resources: free resource before overwriting