Commit 1e6d11fe authored by Lin Yujun's avatar Lin Yujun Committed by Thomas Bogendoerfer
Browse files

MIPS: SGI-IP30: 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: fd27234f

 ("MIPS: add support for SGI Octane (IP30)")
Signed-off-by: default avatarLin Yujun <linyujun809@huawei.com>
Signed-off-by: default avatarThomas Bogendoerfer <tsbogend@alpha.franken.de>
parent 0153682e
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment