aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJohn Baldwin <jhb@FreeBSD.org>2026-02-09 16:27:04 +0000
committerJohn Baldwin <jhb@FreeBSD.org>2026-02-09 16:27:04 +0000
commitefdd30c94e0ac4007b52b6f40afdab52fecf2aa5 (patch)
tree646dee003e1d247563ad14d32257162c3923eba3
parentee73475119ff7aa98bd11828625d524f6ab87f06 (diff)
sdhci_fdt_rockchip: Move ofw_bus_status_okay check
This fixes a warning from GCC: sys/dev/sdhci/sdhci_fdt_rockchip.c: In function 'sdhci_fdt_rockchip_probe': sys/dev/sdhci/sdhci_fdt_rockchip.c:120:14: error: statement will never be executed [-Werror=switch-unreachable] 120 | if (!ofw_bus_status_okay(dev)) | ^~~~~~~~~~~~~~~~~~~~~~~~ Reviewed by: bnovkov, imp, emaste Differential Revision: https://reviews.freebsd.org/D55158
-rw-r--r--sys/dev/sdhci/sdhci_fdt_rockchip.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/sys/dev/sdhci/sdhci_fdt_rockchip.c b/sys/dev/sdhci/sdhci_fdt_rockchip.c
index 44a5e2ffe271..79d299f75fb4 100644
--- a/sys/dev/sdhci/sdhci_fdt_rockchip.c
+++ b/sys/dev/sdhci/sdhci_fdt_rockchip.c
@@ -116,9 +116,10 @@ sdhci_fdt_rockchip_probe(device_t dev)
struct sdhci_fdt_softc *sc = device_get_softc(dev);
sc->quirks = 0;
- switch (ofw_bus_search_compatible(dev, compat_data)->ocd_data) {
if (!ofw_bus_status_okay(dev))
return (ENXIO);
+
+ switch (ofw_bus_search_compatible(dev, compat_data)->ocd_data) {
case SDHCI_FDT_RK3399:
device_set_desc(dev, "Rockchip RK3399 fdt SDHCI controller");
break;