Bug 248941 - [PATCH] pci/ich handle ich_init() error
Summary: [PATCH] pci/ich handle ich_init() error
Status: Closed FIXED
Alias: None
Product: Base System
Classification: Unclassified
Component: kern (show other bugs)
Version: CURRENT
Hardware: Any Any
: --- Affects Some People
Assignee: Mark Johnston
URL: https://github.com/freebsd/freebsd/pu...
Keywords:
Depends on:
Blocks:
 
Reported: 2020-08-27 00:23 UTC by Tong Zhang
Modified: 2020-09-03 13:58 UTC (History)
1 user (show)

See Also:


Attachments
0001-pci-ich-handle-ich_init-error (961 bytes, patch)
2020-08-27 00:23 UTC, Tong Zhang
no flags Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
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.