lkml.org 
[lkml]   [2019]   [Apr]   [16]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
SubjectRe: [2/3] ARM: hisi: check of_iomap and fix missing of_node_put
From
Date
> +++ 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

\
 
 \ /
  Last update: 2019-04-16 18:12    [W:0.079 / U:19.544 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site