Re: [2/3] ARM: hisi: check of_iomap and fix missing of_node_put
From: Markus Elfring
Date: Tue Apr 16 2019 - 12:11:43 EST
> +++ b/arch/arm/mach-hisi/hotplug.c
> @@ -173,11 +173,15 @@ static bool hix5hd2_hotplug_init(void)
â
> + ctrl_base = of_iomap(np, 0);
> + of_node_put(np);
> + if (!ctrl_base)
> + return false;
> +
> + return true;
> }
>
> void hix5hd2_set_cpu(int cpu, bool enable)
Would the use of a ternary operator be more succinct here?
+ return ctrl_base ? true : false;
Regards,
Markus