Skip site navigation (1)Skip section navigation (2)
Date:      Tue, 23 Oct 2018 17:53:35 +0000 (UTC)
From:      Konstantin Belousov <kib@FreeBSD.org>
To:        src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org
Subject:   svn commit: r339663 - head/sys/dev/nvdimm
Message-ID:  <201810231753.w9NHrZht067856@repo.freebsd.org>

next in thread | raw e-mail | index | archive | help
Author: kib
Date: Tue Oct 23 17:53:35 2018
New Revision: 339663
URL: https://svnweb.freebsd.org/changeset/base/339663

Log:
  Initializer error variable in nvdimm_spa_uio().
  
  Several code paths might result in returning uninitialized value.
  
  Reported by:	coverity through cem
  CID:	1396315
  Sponsored by:	The FreeBSD Foundation

Modified:
  head/sys/dev/nvdimm/nvdimm_spa.c

Modified: head/sys/dev/nvdimm/nvdimm_spa.c
==============================================================================
--- head/sys/dev/nvdimm/nvdimm_spa.c	Tue Oct 23 17:06:36 2018	(r339662)
+++ head/sys/dev/nvdimm/nvdimm_spa.c	Tue Oct 23 17:53:35 2018	(r339663)
@@ -157,6 +157,7 @@ nvdimm_spa_uio(struct SPA_mapping *spa, struct uio *ui
 	vm_memattr_t mattr;
 	int error, n;
 
+	error = 0;
 	if (spa->spa_kva == NULL) {
 		mattr = nvdimm_spa_memattr(spa);
 		vm_page_initfake(&m, 0, mattr);



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