]> git.baikalelectronics.ru Git - kernel.git/commit
ARM: imx: Call ida_simple_remove() for ida_simple_get
authorAngus Chen <angus.chen@jaguarmicro.com>
Thu, 5 Jan 2023 06:11:23 +0000 (14:11 +0800)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Fri, 10 Mar 2023 08:32:38 +0000 (09:32 +0100)
commitc2ca5ec53bae1b91581524ed8c37189755ea308e
tree2448c2e1816063e1357db746c4a6d56dd05792b5
parentbb5d970fa0a1670ad9ebb1de01671887adf913da
ARM: imx: Call ida_simple_remove() for ida_simple_get

[ Upstream commit 03e3f5c725b7f1e0e1bd563fc8bbf6956d5613a6 ]

The function call ida_simple_get maybe fail,we should deal with it.
And if ida_simple_get success ,it need to call ida_simple_remove also.
BTW,devm_kasprintf can handle id is zero for consistency.

Fixes: 4a1062433392 ("ARM: imx: Added perf functionality to mmdc driver")
Signed-off-by: Angus Chen <angus.chen@jaguarmicro.com>
Signed-off-by: Shawn Guo <shawnguo@kernel.org>
Signed-off-by: Sasha Levin <sashal@kernel.org>
arch/arm/mach-imx/mmdc.c