FreeBSD Bugzilla – Attachment 217564 Details for
Bug 248941
[PATCH] pci/ich handle ich_init() error
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
Remember
[x]
|
Forgot Password
Login:
[x]
[patch]
0001-pci-ich-handle-ich_init-error
0001-pci-ich-handle-ich_init-error.patch (text/plain), 961 bytes, created by
Tong Zhang
on 2020-08-27 00:23:49 UTC
(
hide
)
Description:
0001-pci-ich-handle-ich_init-error
Filename:
MIME Type:
Creator:
Tong Zhang
Created:
2020-08-27 00:23:49 UTC
Size:
961 bytes
patch
obsolete
>From 9be29e70e1e8b3f4b7daae33f38f291ec84daeae Mon Sep 17 00:00:00 2001 >From: Tong Zhang <ztong0001@gmail.com> >Date: Wed, 19 Aug 2020 15:22:19 -0400 >Subject: [PATCH] pci/ich handle ich_init() error > >ich_init() can only return 0 and ENXIO(6) and the caller is checking >failure using == -1 >--- > sys/dev/sound/pci/ich.c | 6 ++++-- > 1 file changed, 4 insertions(+), 2 deletions(-) > >diff --git a/sys/dev/sound/pci/ich.c b/sys/dev/sound/pci/ich.c >index 03af77aca0a..2f318866e79 100644 >--- a/sys/dev/sound/pci/ich.c >+++ b/sys/dev/sound/pci/ich.c >@@ -1191,15 +1191,17 @@ ich_pci_resume(device_t dev) > { > struct sc_info *sc; > int i; >+ int err; > > 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); >-- >2.25.1 >
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Diff
View Attachment As Raw
Actions:
View
|
Diff
Attachments on
bug 248941
: 217564