Bug 248941

Summary: [PATCH] pci/ich handle ich_init() error
Product: Base System Reporter: Tong Zhang <ztong0001>
Component: kernAssignee: Mark Johnston <markj>
Status: Closed FIXED    
Severity: Affects Some People CC: markj
Priority: ---    
Version: CURRENT   
Hardware: Any   
OS: Any   
URL: https://github.com/freebsd/freebsd/pull/437
Attachments:
Description Flags
0001-pci-ich-handle-ich_init-error none

Description Tong Zhang 2020-08-27 00:23:49 UTC
Created attachment 217564 [details]
0001-pci-ich-handle-ich_init-error

ich_init() can only return 0 and ENXIO(6) and the caller is checking
failure using == -1
Comment 1 commit-hook freebsd_committer freebsd_triage 2020-08-27 16:36:54 UTC
A commit references this bug:

Author: markj
Date: Thu Aug 27 16:36:07 UTC 2020
New revision: 364873
URL: https://svnweb.freebsd.org/changeset/base/364873

Log:
  snd_ich(4): Handle errors from ich_init() properly during resume.

  ich_init() returns an errno value or 0, but ich_pci_resume() was
  comparing the return value with -1 to determine whether an error had
  occurred.

  PR:		248941
  Submitted by:	Tong Zhang <ztong0001@gmail.com>
  MFC after:	1 week

Changes:
  head/sys/dev/sound/pci/ich.c
Comment 2 commit-hook freebsd_committer freebsd_triage 2020-09-03 13:56:51 UTC
A commit references this bug:

Author: markj
Date: Thu Sep  3 13:56:30 UTC 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

Changes:
_U  stable/12/
  stable/12/sys/dev/sound/pci/ich.c
Comment 3 Mark Johnston freebsd_committer freebsd_triage 2020-09-03 13:58:53 UTC
Thanks for the patches.