svn commit: r351189 - head/sys/dev/fdt

Michal Meloun mmel at FreeBSD.org
Sun Aug 18 15:37:20 UTC 2019


Author: mmel
Date: Sun Aug 18 15:37:19 2019
New Revision: 351189
URL: https://svnweb.freebsd.org/changeset/base/351189

Log:
  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

Modified:
  head/sys/dev/fdt/simple_mfd.c

Modified: head/sys/dev/fdt/simple_mfd.c
==============================================================================
--- head/sys/dev/fdt/simple_mfd.c	Sun Aug 18 11:43:58 2019	(r351188)
+++ head/sys/dev/fdt/simple_mfd.c	Sun Aug 18 15:37:19 2019	(r351189)
@@ -134,7 +134,7 @@ simple_mfd_syscon_get_handle(device_t dev, struct sysc
 
 	sc = device_get_softc(dev);
 	*syscon = sc->syscon;
-	if (syscon == NULL)
+	if (*syscon == NULL)
 		return (ENODEV);
 	return (0);
 }


More information about the svn-src-all mailing list