Skip site navigation (1)Skip section navigation (2)
Date:      Thu, 28 Nov 2019 20:17:03 +0000 (UTC)
From:      Emmanuel Vadot <manu@FreeBSD.org>
To:        src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org
Subject:   svn commit: r355190 - head/sys/arm64/rockchip
Message-ID:  <201911282017.xASKH3Qm057798@repo.freebsd.org>

next in thread | raw e-mail | index | archive | help
Author: manu
Date: Thu Nov 28 20:17:03 2019
New Revision: 355190
URL: https://svnweb.freebsd.org/changeset/base/355190

Log:
  arm64: rockchip: tsadc: Do not free the sysctl context is it wasn't created
  
  MFC after:	3 weeks
  X-MFC-With:	r355173

Modified:
  head/sys/arm64/rockchip/rk_tsadc.c

Modified: head/sys/arm64/rockchip/rk_tsadc.c
==============================================================================
--- head/sys/arm64/rockchip/rk_tsadc.c	Thu Nov 28 20:09:19 2019	(r355189)
+++ head/sys/arm64/rockchip/rk_tsadc.c	Thu Nov 28 20:17:03 2019	(r355190)
@@ -728,16 +728,17 @@ tsadc_attach(device_t dev)
 	rv = tsadc_init_sysctl(sc);
 	if (rv != 0) {
 		device_printf(sc->dev, "Cannot initialize sysctls\n");
-		goto fail;
+		goto fail_sysctl;
 	}
 
 	OF_device_register_xref(OF_xref_from_node(node), dev);
 	return (bus_generic_attach(dev));
 
+fail_sysctl:
+	sysctl_ctx_free(&tsadc_sysctl_ctx);
 fail:
 	if (sc->irq_ih != NULL)
 		bus_teardown_intr(dev, sc->irq_res, sc->irq_ih);
-	sysctl_ctx_free(&tsadc_sysctl_ctx);
 	if (sc->tsadc_clk != NULL)
 		clk_release(sc->tsadc_clk);
 	if (sc->apb_pclk_clk != NULL)



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