Source-Changes-HG archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
[src/trunk]: src/sys/arch/evbarm/fdt Simplify. NFCI.
details: https://anonhg.NetBSD.org/src/rev/1dc89b6755b1
branches: trunk
changeset: 957314:1dc89b6755b1
user: skrll <skrll%NetBSD.org@localhost>
date: Tue Nov 24 06:36:36 2020 +0000
description:
Simplify. NFCI.
diffstat:
sys/arch/evbarm/fdt/fdt_machdep.c | 24 ++++++++++++------------
1 files changed, 12 insertions(+), 12 deletions(-)
diffs (46 lines):
diff -r fcd8e887aa88 -r 1dc89b6755b1 sys/arch/evbarm/fdt/fdt_machdep.c
--- a/sys/arch/evbarm/fdt/fdt_machdep.c Tue Nov 24 00:48:39 2020 +0000
+++ b/sys/arch/evbarm/fdt/fdt_machdep.c Tue Nov 24 06:36:36 2020 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: fdt_machdep.c,v 1.78 2020/11/07 08:28:15 skrll Exp $ */
+/* $NetBSD: fdt_machdep.c,v 1.79 2020/11/24 06:36:36 skrll Exp $ */
/*-
* Copyright (c) 2015-2017 Jared McNeill <jmcneill%invisible.ca@localhost>
@@ -27,7 +27,7 @@
*/
#include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: fdt_machdep.c,v 1.78 2020/11/07 08:28:15 skrll Exp $");
+__KERNEL_RCSID(0, "$NetBSD: fdt_machdep.c,v 1.79 2020/11/24 06:36:36 skrll Exp $");
#include "opt_machdep.h"
#include "opt_bootconfig.h"
@@ -534,17 +534,17 @@
/* Load FDT */
int error = fdt_check_header(fdt_addr_r);
- if (error == 0) {
- /* If the DTB is too big, try to pack it in place first. */
- if (fdt_totalsize(fdt_addr_r) > sizeof(fdt_data))
- (void)fdt_pack(__UNCONST(fdt_addr_r));
- error = fdt_open_into(fdt_addr_r, fdt_data, sizeof(fdt_data));
- if (error != 0)
- panic("fdt_move failed: %s", fdt_strerror(error));
- fdtbus_init(fdt_data);
- } else {
+ if (error != 0)
panic("fdt_check_header failed: %s", fdt_strerror(error));
- }
+
+ /* If the DTB is too big, try to pack it in place first. */
+ if (fdt_totalsize(fdt_addr_r) > sizeof(fdt_data))
+ (void)fdt_pack(__UNCONST(fdt_addr_r));
+ error = fdt_open_into(fdt_addr_r, fdt_data, sizeof(fdt_data));
+ if (error != 0)
+ panic("fdt_move failed: %s", fdt_strerror(error));
+
+ fdtbus_init(fdt_data);
/* Lookup platform specific backend */
plat = arm_fdt_platform();
Home |
Main Index |
Thread Index |
Old Index