Skip site navigation (1)Skip section navigation (2)
Date:      Mon, 9 Mar 2020 04:09:36 +0000 (UTC)
From:      Philip Paeps <philip@FreeBSD.org>
To:        src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org
Subject:   svn commit: r358801 - head/sys/riscv/sifive
Message-ID:  <202003090409.02949anx067641@repo.freebsd.org>

next in thread | raw e-mail | index | archive | help
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);
 }



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