lkml.org 
[lkml]   [2012]   [Jul]   [3]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
From
SubjectRe: [PATCH v7 1/5] powerpc/85xx: implement hardware timebase sync
Date
On Tue, Jul 3, 2012 at 5:21 AM, Zhao Chenhui <chenhui.zhao@freescale.com> wrote:

> + np = of_find_matching_node(NULL, mpc85xx_smp_guts_ids);
> + if (np) {
> + guts = of_iomap(np, 0);
> + of_node_put(np);
> + if (!guts) {
> + pr_err("%s: Could not map guts node address\n",
> + __func__);
> + return;
> + }
> + smp_85xx_ops.give_timebase = mpc85xx_give_timebase;
> + smp_85xx_ops.take_timebase = mpc85xx_take_timebase;
> + }

I had this in mind:

guts = of_iomap(np, 0);
of_node_put(np);
if (guts) {
smp_85xx_ops.give_timebase = mpc85xx_give_timebase;
smp_85xx_ops.take_timebase = mpc85xx_take_timebase;
} else {
pr_err("%s: Could not map guts node address\n",
__func__);
}

That way, a missing GUTS node does not break everything.

--
Timur Tabi
Linux kernel developer at Freescale


\
 
 \ /
  Last update: 2012-07-03 15:01    [W:0.134 / U:0.104 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site