aboutsummaryrefslogtreecommitdiff
path: root/arch/powerpc/platforms
diff options
context:
space:
mode:
authorGravatar Yang Yingliang <yangyingliang@huawei.com> 2022-10-29 19:16:26 +0800
committerGravatar Michael Ellerman <mpe@ellerman.id.au> 2022-12-02 20:09:48 +1100
commit4d0eea415216fe3791da2f65eb41399e70c7bedf (patch)
treefbd3ec0b8e5d6ab73dcdc1dd63e75e10032978e2 /arch/powerpc/platforms
parentMerge branch 'topic/qspinlock' into next (diff)
downloadlinux-4d0eea415216fe3791da2f65eb41399e70c7bedf.tar.gz
linux-4d0eea415216fe3791da2f65eb41399e70c7bedf.tar.bz2
linux-4d0eea415216fe3791da2f65eb41399e70c7bedf.zip
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
Diffstat (limited to 'arch/powerpc/platforms')
-rw-r--r--arch/powerpc/platforms/83xx/mpc832x_rdb.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/arch/powerpc/platforms/83xx/mpc832x_rdb.c b/arch/powerpc/platforms/83xx/mpc832x_rdb.c
index e12cb44e717f..caa96edf0e72 100644
--- a/arch/powerpc/platforms/83xx/mpc832x_rdb.c
+++ b/arch/powerpc/platforms/83xx/mpc832x_rdb.c
@@ -107,7 +107,7 @@ static int __init of_fsl_spi_probe(char *type, char *compatible, u32 sysclk,
goto next;
unreg:
- platform_device_del(pdev);
+ platform_device_put(pdev);
err:
pr_err("%pOF: registration failed\n", np);
next: