Skip to content
Commit 11bec9cb authored by Lin Yujun's avatar Lin Yujun Committed by Thomas Bogendoerfer
Browse files

MIPS: SGI-IP27: Fix platform-device leak in bridge_platform_create()



In error case in bridge_platform_create after calling
platform_device_add()/platform_device_add_data()/
platform_device_add_resources(), release the failed
'pdev' or it will be leak, call platform_device_put()
to fix this problem.

Besides, 'pdev' is divided into 'pdev_wd' and 'pdev_bd',
use platform_device_unregister() to release sgi_w1
resources when xtalk-bridge registration fails.

Fixes: 5dc76a96 ("MIPS: PCI: use information from 1-wire PROM for IOC3 detection")
Signed-off-by: default avatarLin Yujun <linyujun809@huawei.com>
Signed-off-by: default avatarThomas Bogendoerfer <tsbogend@alpha.franken.de>
parent 1e6d11fe
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please to comment