Re: [PATCH -next] MIPS: SGI-IP30: Fix platform-device leak in bridge_platform_create()

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Wed, Sep 14, 2022 at 11:28:07AM +0800, Lin Yujun wrote:
> 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: fd27234f24ae ("MIPS: add support for SGI Octane (IP30)")
> Signed-off-by: Lin Yujun <linyujun809@xxxxxxxxxx>
> ---
>  arch/mips/sgi-ip30/ip30-xtalk.c | 70 +++++++++++++++++++++++----------
>  1 file changed, 50 insertions(+), 20 deletions(-)

applied to mips-next.

Thomas.

-- 
Crap can work. Given enough thrust pigs will fly, but it's not necessarily a
good idea.                                                [ RFC1925, 2.3 ]



[Index of Archives]     [LKML Archive]     [Linux ARM Kernel]     [Linux ARM]     [Git]     [Yosemite News]     [Linux SCSI]     [Linux Hams]

  Powered by Linux