Source-Changes-HG archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

[src/trunk]: src/sys/arch/arm/rockchip save the return value of fdtbus_clock_...



details:   https://anonhg.NetBSD.org/src/rev/47ba14ae7a5f
branches:  trunk
changeset: 1017554:47ba14ae7a5f
user:      mrg <mrg%NetBSD.org@localhost>
date:      Thu Dec 31 06:44:11 2020 +0000

description:
save the return value of fdtbus_clock_enable() so we can both
report it correctly instead of always 0, and also return failure
to the caller.

diffstat:

 sys/arch/arm/rockchip/rk_i2s.c |  7 ++++---
 1 files changed, 4 insertions(+), 3 deletions(-)

diffs (28 lines):

diff -r 29fb87ad89c9 -r 47ba14ae7a5f sys/arch/arm/rockchip/rk_i2s.c
--- a/sys/arch/arm/rockchip/rk_i2s.c    Thu Dec 31 04:38:55 2020 +0000
+++ b/sys/arch/arm/rockchip/rk_i2s.c    Thu Dec 31 06:44:11 2020 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: rk_i2s.c,v 1.3 2020/02/29 05:51:10 isaki Exp $ */
+/* $NetBSD: rk_i2s.c,v 1.4 2020/12/31 06:44:11 mrg Exp $ */
 
 /*-
  * Copyright (c) 2019 Jared McNeill <jmcneill%invisible.ca@localhost>
@@ -27,7 +27,7 @@
  */
 
 #include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: rk_i2s.c,v 1.3 2020/02/29 05:51:10 isaki Exp $");
+__KERNEL_RCSID(0, "$NetBSD: rk_i2s.c,v 1.4 2020/12/31 06:44:11 mrg Exp $");
 
 #include <sys/param.h>
 #include <sys/bus.h>
@@ -536,7 +536,8 @@
        }
 
        /* Enable bus clock */
-       if (fdtbus_clock_enable(phandle, "i2s_hclk", true) != 0) {
+       error = fdtbus_clock_enable(phandle, "i2s_hclk", true);
+       if (error != 0) {
                aprint_error(": couldn't enable i2s_hclk clock: %d\n", error);
                return error;
        }



Home | Main Index | Thread Index | Old Index