Messages in this thread | | | Date | Tue, 15 Jan 2019 05:54:41 -0800 | From | Christoph Hellwig <> | Subject | Re: [PATCH v2 6/8] RISC-V: Add required checks during clock source init |
| |
> hartid = riscv_of_processor_hartid(n); > + if (hartid < 0) { > + pr_warn("Not valid hartid for node [%pOF] error = [%d]\n", > + n, hartid); > + return hartid; > + } > cpuid = riscv_hartid_to_cpuid(hartid); > > + if (cpuid < 0) { > + pr_warn("Invalid cpuid for hartid [%d]\n", hartid); > + return cpuid; > + } > +
No need for the empty line after the riscv_hartid_to_cpuid call.
> - clocksource_register_hz(cs, riscv_timebase); > + error = clocksource_register_hz(cs, riscv_timebase); > > + if (error) {
Same here.
| |