powerpc/83xx/mpc832x_rdb: call platform_device_put() in error case in of_fsl_spi_probe()
authorYang Yingliang <yangyingliang@huawei.com>
Sat, 29 Oct 2022 11:16:26 +0000 (19:16 +0800)
committerMichael Ellerman <mpe@ellerman.id.au>
Fri, 2 Dec 2022 09:09:48 +0000 (20:09 +1100)
commit4d0eea415216fe3791da2f65eb41399e70c7bedf
treefbd3ec0b8e5d6ab73dcdc1dd63e75e10032978e2
parent22db71bcba826c607324a8ee1b21f5cf7ec71e8b
powerpc/83xx/mpc832x_rdb: call platform_device_put() in error case in of_fsl_spi_probe()

If platform_device_add() is not called or failed, it can not call
platform_device_del() to clean up memory, it should call
platform_device_put() in error case.

Fixes: 26f6cb999366 ("[POWERPC] fsl_soc: add support for fsl_spi")
Signed-off-by: Yang Yingliang <yangyingliang@huawei.com>
Signed-off-by: Michael Ellerman <mpe@ellerman.id.au>
Link: https://lore.kernel.org/r/20221029111626.429971-1-yangyingliang@huawei.com
arch/powerpc/platforms/83xx/mpc832x_rdb.c