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)
committerShawn Guo <shawnguo@kernel.org>
Wed, 25 Jan 2023 23:55:53 +0000 (07:55 +0800)
commitebeb49f43c8952f12aa20f03f00d7009edc2d1c5
tree58230d27e01588cc3f61acd37d768787fac89035
parent1b929c02afd37871d5afb9d498426f83432e71c2
ARM: imx: Call ida_simple_remove() for ida_simple_get

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: e76bdfd7403a ("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>
arch/arm/mach-imx/mmdc.c