From 76eeda8557daf1a8931218ae1b30f9daeb99efa5 Mon Sep 17 00:00:00 2001 From: Michal Meloun Date: Sun, 18 Aug 2019 15:37:19 +0000 Subject: [PATCH] Fix bug introduced by r351184. We should check the returned handle, not the pointer to it. Noticed by: ian X-MFC with: r351184 MFC after: 1 week --- sys/dev/fdt/simple_mfd.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/sys/dev/fdt/simple_mfd.c b/sys/dev/fdt/simple_mfd.c index 61868657d80b..752740cf705e 100644 --- a/sys/dev/fdt/simple_mfd.c +++ b/sys/dev/fdt/simple_mfd.c @@ -134,7 +134,7 @@ simple_mfd_syscon_get_handle(device_t dev, struct syscon **syscon) sc = device_get_softc(dev); *syscon = sc->syscon; - if (syscon == NULL) + if (*syscon == NULL) return (ENODEV); return (0); }