Skip site navigation (1)Skip section navigation (2)
Date:      Sun, 30 Dec 2012 21:10:49 +0000 (UTC)
From:      Robert Watson <rwatson@FreeBSD.org>
To:        src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org
Subject:   svn commit: r244871 - head/sys/dev/fdt
Message-ID:  <201212302110.qBULAnYm081346@svn.freebsd.org>

next in thread | raw e-mail | index | archive | help
Author: rwatson
Date: Sun Dec 30 21:10:48 2012
New Revision: 244871
URL: http://svnweb.freebsd.org/changeset/base/244871

Log:
  When a partially initialised FDT-based device instance can't attach,
  perhaps due to an interrupt configuration problem, do not try to free
  device ivars that have not yet have been allocated.
  
  MFC after:	1 week
  Reviewed by:	gonzo
  Sponsored by:	DARPA, AFRL

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

Modified: head/sys/dev/fdt/fdtbus.c
==============================================================================
--- head/sys/dev/fdt/fdtbus.c	Sun Dec 30 21:07:21 2012	(r244870)
+++ head/sys/dev/fdt/fdtbus.c	Sun Dec 30 21:10:48 2012	(r244871)
@@ -257,6 +257,8 @@ newbus_device_destroy(device_t dev)
 	struct fdtbus_devinfo *di;
 
 	di = device_get_ivars(dev);
+	if (di == NULL)
+		return;
 
 	free(di->di_name, M_OFWPROP);
 	free(di->di_type, M_OFWPROP);



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201212302110.qBULAnYm081346>