svn commit: r358801 - head/sys/riscv/sifive

Philip Paeps philip at FreeBSD.org
Mon Mar 9 04:09:38 UTC 2020


Author: philip
Date: Mon Mar  9 04:09:36 2020
New Revision: 358801
URL: https://svnweb.freebsd.org/changeset/base/358801

Log:
  fuspi: silence build warning, plug resource leak
  
  This silences an "unused label" warning as well as fixes the attach fail
  path that wasn't releasing resources.
  
  Submitted by:   Nicholas O'Brien <nickisobrien_gmail.com>
  Sponsored by:	Axiado
  Differential Revision: https://reviews.freebsd.org/D24004

Modified:
  head/sys/riscv/sifive/fu540_spi.c

Modified: head/sys/riscv/sifive/fu540_spi.c
==============================================================================
--- head/sys/riscv/sifive/fu540_spi.c	Mon Mar  9 03:34:16 2020	(r358800)
+++ head/sys/riscv/sifive/fu540_spi.c	Mon Mar  9 04:09:36 2020	(r358801)
@@ -348,10 +348,8 @@ fuspi_attach(device_t dev)
 
 	return (0);
 
-fail1:
-	bus_release_resources(dev, fuspi_spec, &sc->res);
-
 fail:
+	bus_release_resources(dev, fuspi_spec, &sc->res);
 	mtx_destroy(&sc->mtx);
 	return (error);
 }


More information about the svn-src-head mailing list