mirror of
https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git
synced 2024-09-29 13:53:33 +00:00
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: 26f6cb9993
("[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
This commit is contained in:
parent
22db71bcba
commit
4d0eea4152
1 changed files with 1 additions and 1 deletions
|
@ -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:
|
||||
|
|
Loading…
Reference in a new issue