From: Lu Wei <luwei32@huawei.com>
To: <perex@perex.cz>, <tiwai@suse.com>, <alsa-devel@alsa-project.org>,
<linux-kernel@vger.kernel.org>
Subject: [PATCH net-next] ALSA: ice1724: return void from snd_vt1724_chip_init()
Date: Mon, 16 May 2022 14:25:46 +0800 [thread overview]
Message-ID: <20220516062546.253656-1-luwei32@huawei.com> (raw)
Return int in snd_vt1724_chip_init() is useless since it always
returns 0.
Signed-off-by: Lu Wei <luwei32@huawei.com>
---
sound/pci/ice1712/ice1724.c | 14 ++++----------
1 file changed, 4 insertions(+), 10 deletions(-)
diff --git a/sound/pci/ice1712/ice1724.c b/sound/pci/ice1712/ice1724.c
index 6fab2ad85bbe..dfef468ad6dc 100644
--- a/sound/pci/ice1712/ice1724.c
+++ b/sound/pci/ice1712/ice1724.c
@@ -2347,7 +2347,7 @@ static void snd_vt1724_chip_reset(struct snd_ice1712 *ice)
msleep(10);
}
-static int snd_vt1724_chip_init(struct snd_ice1712 *ice)
+static void snd_vt1724_chip_init(struct snd_ice1712 *ice)
{
outb(ice->eeprom.data[ICE_EEP2_SYSCONF], ICEREG1724(ice, SYS_CFG));
outb(ice->eeprom.data[ICE_EEP2_ACLINK], ICEREG1724(ice, AC97_CFG));
@@ -2369,8 +2369,6 @@ static int snd_vt1724_chip_init(struct snd_ice1712 *ice)
* since they cause machine lockups
*/
outb(VT1724_MULTI_FIFO_ERR, ICEMT1724(ice, DMA_INT_MASK));
-
- return 0;
}
static int snd_vt1724_spdif_build_controls(struct snd_ice1712 *ice)
@@ -2506,8 +2504,8 @@ static int snd_vt1724_create(struct snd_card *card,
snd_vt1724_chip_reset(ice);
if (snd_vt1724_read_eeprom(ice, modelname) < 0)
return -EIO;
- if (snd_vt1724_chip_init(ice) < 0)
- return -EIO;
+
+ snd_vt1724_chip_init(ice);
return 0;
}
@@ -2702,11 +2700,7 @@ static int snd_vt1724_resume(struct device *dev)
return 0;
snd_vt1724_chip_reset(ice);
-
- if (snd_vt1724_chip_init(ice) < 0) {
- snd_card_disconnect(card);
- return -EIO;
- }
+ snd_vt1724_chip_init(ice);
if (ice->pm_resume)
ice->pm_resume(ice);
--
2.17.1
reply other threads:[~2022-05-16 6:25 UTC|newest]
Thread overview: [no followups] expand[flat|nested] mbox.gz Atom feed
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20220516062546.253656-1-luwei32@huawei.com \
--to=luwei32@huawei.com \
--cc=alsa-devel@alsa-project.org \
--cc=linux-kernel@vger.kernel.org \
--cc=perex@perex.cz \
--cc=tiwai@suse.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox
all inboxes | Powered by JetHome®