]> git.baikalelectronics.ru Git - kernel.git/commit
clk: imx: scu: fix memleak on platform_device_add() fails
authorLin Yujun <linyujun809@huawei.com>
Wed, 14 Sep 2022 03:32:06 +0000 (11:32 +0800)
committerStephen Boyd <sboyd@kernel.org>
Sat, 1 Oct 2022 00:06:59 +0000 (17:06 -0700)
commit5eebe3a9d31ef45a8df7d2e9101bae71aae49096
treed68eb4343dbd45357752276525e1abdb3796cd1f
parentd87cd28e9c0c8ed07b7c62328368b3e55000fa6d
clk: imx: scu: fix memleak on platform_device_add() fails

No error handling is performed when platform_device_add()
fails. Add error processing before return, and modified
the return value.

Fixes: 35a4e193b16b ("clk: imx: scu: add two cells binding support")
Signed-off-by: Lin Yujun <linyujun809@huawei.com>
Link: https://lore.kernel.org/r/20220914033206.98046-1-linyujun809@huawei.com
Signed-off-by: Stephen Boyd <sboyd@kernel.org>
drivers/clk/imx/clk-scu.c