Skip site navigation (1)Skip section navigation (2)
Date:      Thu, 3 Sep 2020 13:56:30 +0000 (UTC)
From:      Mark Johnston <markj@FreeBSD.org>
To:        src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-12@freebsd.org
Subject:   svn commit: r365298 - stable/12/sys/dev/sound/pci
Message-ID:  <202009031356.083DuU3m035837@repo.freebsd.org>

next in thread | raw e-mail | index | archive | help
Author: markj
Date: Thu Sep  3 13:56:30 2020
New Revision: 365298
URL: https://svnweb.freebsd.org/changeset/base/365298

Log:
  MFC r364873:
  snd_ich(4): Handle errors from ich_init() properly during resume.
  
  PR:	248941

Modified:
  stable/12/sys/dev/sound/pci/ich.c
Directory Properties:
  stable/12/   (props changed)

Modified: stable/12/sys/dev/sound/pci/ich.c
==============================================================================
--- stable/12/sys/dev/sound/pci/ich.c	Thu Sep  3 13:22:09 2020	(r365297)
+++ stable/12/sys/dev/sound/pci/ich.c	Thu Sep  3 13:56:30 2020	(r365298)
@@ -1190,16 +1190,17 @@ static int
 ich_pci_resume(device_t dev)
 {
 	struct sc_info *sc;
-	int i;
+	int err, i;
 
 	sc = pcm_getdevinfo(dev);
 
 	ICH_LOCK(sc);
 	/* Reinit audio device */
-    	if (ich_init(sc) == -1) {
+	err = ich_init(sc);
+	if (err != 0) {
 		device_printf(dev, "unable to reinitialize the card\n");
 		ICH_UNLOCK(sc);
-		return (ENXIO);
+		return (err);
 	}
 	/* Reinit mixer */
 	ich_pci_codec_reset(sc);



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