From: Colin King <colin.king@canonical.com> To: Jaroslav Kysela <perex@perex.cz>, Takashi Iwai <tiwai@suse.com>, alsa-devel@alsa-project.org Cc: kernel-janitors@vger.kernel.org, linux-kernel@vger.kernel.org Subject: [PATCH] ALSA: sb: remove redundant assignment to variable result Date: Tue, 13 Aug 2019 15:01:51 +0100 [thread overview] Message-ID: <20190813140151.9865-1-colin.king@canonical.com> (raw) From: Colin Ian King <colin.king@canonical.com> Variable result is initialized to a value that is never read and it is re-assigned later. The initialization is redundant and can be removed. Addresses-Coverity: ("Unused value") Signed-off-by: Colin Ian King <colin.king@canonical.com> --- sound/isa/sb/sb_common.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/sound/isa/sb/sb_common.c b/sound/isa/sb/sb_common.c index 162338f1b68a..ff031d670400 100644 --- a/sound/isa/sb/sb_common.c +++ b/sound/isa/sb/sb_common.c @@ -80,7 +80,7 @@ int snd_sbdsp_reset(struct snd_sb *chip) static int snd_sbdsp_version(struct snd_sb * chip) { - unsigned int result = -ENODEV; + unsigned int result; snd_sbdsp_command(chip, SB_DSP_GET_VERSION); result = (short) snd_sbdsp_get_byte(chip) << 8; -- 2.20.1
WARNING: multiple messages have this Message-ID (diff)
From: Colin King <colin.king@canonical.com> To: Jaroslav Kysela <perex@perex.cz>, Takashi Iwai <tiwai@suse.com>, alsa-devel@alsa-project.org Cc: kernel-janitors@vger.kernel.org, linux-kernel@vger.kernel.org Subject: [PATCH] ALSA: sb: remove redundant assignment to variable result Date: Tue, 13 Aug 2019 14:01:51 +0000 [thread overview] Message-ID: <20190813140151.9865-1-colin.king@canonical.com> (raw) From: Colin Ian King <colin.king@canonical.com> Variable result is initialized to a value that is never read and it is re-assigned later. The initialization is redundant and can be removed. Addresses-Coverity: ("Unused value") Signed-off-by: Colin Ian King <colin.king@canonical.com> --- sound/isa/sb/sb_common.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/sound/isa/sb/sb_common.c b/sound/isa/sb/sb_common.c index 162338f1b68a..ff031d670400 100644 --- a/sound/isa/sb/sb_common.c +++ b/sound/isa/sb/sb_common.c @@ -80,7 +80,7 @@ int snd_sbdsp_reset(struct snd_sb *chip) static int snd_sbdsp_version(struct snd_sb * chip) { - unsigned int result = -ENODEV; + unsigned int result; snd_sbdsp_command(chip, SB_DSP_GET_VERSION); result = (short) snd_sbdsp_get_byte(chip) << 8; -- 2.20.1
next reply other threads:[~2019-08-13 14:02 UTC|newest] Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top 2019-08-13 14:01 Colin King [this message] 2019-08-13 14:01 ` [PATCH] ALSA: sb: remove redundant assignment to variable result Colin King 2019-08-14 15:44 ` Takashi Iwai 2019-08-14 15:44 ` Takashi Iwai 2019-08-14 15:44 ` Takashi Iwai
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=20190813140151.9865-1-colin.king@canonical.com \ --to=colin.king@canonical.com \ --cc=alsa-devel@alsa-project.org \ --cc=kernel-janitors@vger.kernel.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: linkBe sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes, see mirroring instructions on how to clone and mirror all data and code used by this external index.